---
title: "3. Example: Simple process"
description: "Wizards serve as a **platform for modeling and executing various processes** in Signatus. Most common processes consist of the following steps: - downloading list of available documents and metadata - downloading selected documents - obtaining signatures and data - delivering…"
url: "https://wiki.signatus.com/documentation/mobile-app-signatus/most-used-javascript-calls/"
updated: "2026-02-05"
category: Customization – Wizard SDK
---

# 3. Example: Simple process

Wizards serve as a **platform for modeling and executing various processes** in Signatus.

Most common processes consist of the following steps:

- downloading list of available documents and metadata
- downloading selected documents
- obtaining signatures and data
- delivering signed documents and metadata to a target system

### 1. Get Document List

Documents list is downloaded from a selected channel (e.g. internal system, external storage, or integration interface) and prepared for further processing

Wizard SDK function : **downloadList**

Parameter description :

| Name | Format | Description |
| --- | --- | --- |
| channel | string | Download channel name |
| call | string | Callback function name |

Example :

```
function getDocuments () {
    let arg = {};
    arg.channel = "MyDocuments";
    arg.call = "onGetDocuments"
    // call Signatus Wizard SDK function
    downloadList(arg);
}

/**
 * callback function for downloadList
 * @param res - result in string format
 */
function onGetDocuments (res) {
    console.log(res);
    let result = JSON.parse(res);
    // business logic eg. show documents...
}
```

Result example :

```
{
	"parameter": {
		"status": "OK",
		"message": "Download OK",
		"data": [
			{
				"id": "Test1.pdf",
				"filename": "Test1.pdf",
				"url": "file:/storage/emulated/0/Signatus/inbox/Test1.pdf",
				"size": 25605,
				"lastModified": 1768297137726
			},
			{
				"id": "Test2.pdf",
				"filename": "Test2.pdf",
				"url": "file:/storage/emulated/0/Signatus/inbox/Test2.pdf",
				"size": 25605,
				"lastModified": 1768297166546
			}
		]
	}
}
```

### 2. Document Download

Documents and data are downloaded from a selected channel (e.g. internal system, external storage, or integration interface) and prepared for further processing.

Wizard SDK function : **download**

Parameter description :

| Name | Format | Description |
| --- | --- | --- |
| channel | string | Download channel name |
| url | string | absolute or relative download URL (if relative URL is used, the channel parameter is required) |
| savePath | string | path to the workspace directory where the downloaded file will be saved |
| call | string | Callback function name |

Example :

In this example parameter *document*is **result.parameter.data[0]** from downloadList result

```
function downloadDocument (document) {
    let arg = {};
    arg.channel = "MyDocuments";
    arg.url = document.url;
    arg.savePath = "/tosign/" + document.filename;
    arg.call = "onDownloadDocument";
    // call Signatus Wizard SDK function
    download(arg);
}

/**
 * callback function for downloadDocument
 * @param res - result in string format
 */
function onDownloadDocument (res) {
    console.log(res);
    let result= JSON.parse(res);
    // business logic eg. sign document ...
}
```

Result example :

```
{
	"parameter": {
		"status": "OK",
		"message": "Download OK",
		"savePath": "/tosign/Test1.pdf",
		"data": {
			"id": "Test1.pdf",
			"filename": "Test1.pdf",
			"url": "file:/data/user/0/com.anasoft.signatus.app/files/WorkSpace/tosign/Test1.pdf",
			"size": 25605,
			"lastModified": 1768297137000
		},
		"code": ""
	}
}
```

### 3. Signing

Documents are signed and data processed according to the defined signing method and rules. The wizard ensures all required signature fields are completed and the document reaches a valid signed state.

Wizard SDK function : **signPdf**

Parameter description :

| Name | Format | Description |
| --- | --- | --- |
| path | string | path to the workspace directory where the file is saved |
| savePath | string | path to the workspace directory where the signed file will be saved |
| call | string | Callback function name |

Example :

In this example parameter *path*is **result.parameter.savePath** from download result

```
function signDocument (path) {
    let arg = {};
    arg.path = path;
    arg.savePath = "/signed/Signed.pdf";
    arg.call = "onSignDocument";
    // call Signatus Wizard SDK function
    signPdf(arg);
}

/**
 * callback function for signDocument
 * @param res - result in string format
 */
function onSignDocument (res) {
    console.log(res);
    let result = JSON.parse(res);
    // business logic eg. upload signaed document...
}
```

Result example :

```
{
	"parameter": "true",
	"data": {
		"annotation": false
	}
}
```

-

### 4. Outbox & Delivery

After signing, documents and data are placed in the outbox and sent to the target server or system.

Wizard SDK function : **send**

Parameter description :

| Name | Format | Description |
| --- | --- | --- |
| channel | string | Upload channel name |
| file | string | name of the file to upload |
| call | string | Callback function name |

Example :

```
function deliveryDocument () {
    let arg = {};
    arg.channel = "SignedDocuments";
    arg.file = "/signed/Signed.pdf";
    arg.call = "onDeliveryDocument";
    // call Signatus Wizard SDK function
    send(arg);

}

/**
 * callback function for deliveryDocument
 * @param res - result in string format
 */
function onDeliveryDocument (res) {
    console.log(res);
    let result = JSON.parse(res);
    // business logic eg. show success message...
}
```

Result example :

```
{
	"parameter": {
		"status": "OK",
		"message": ""
	}
}
```
