Start
Summary
- Internal name:
Start - Category: Workflow Control
- Purpose: Mark the beginning of a workflow execution, initialize the execution context (variables, timeout, execution policy).
- Task type: Workflow Control
Compatibility
-
Minimum AndroMate version:
1.1.0 -
Maximum AndroMate version:
1.1.0 -
Minimum Android:
Android 13 (API 33) -
Maximum Android tested:
Android 16 (API 36) -
Supported manufacturers:
- ✅ All manufacturers
-
Required permissions:
- None
Detailed description
The Start task is the mandatory entry point of every workflow. There is always exactly one Start node per workflow, and graph traversal begins from it.
It is used to:
- Define the initial variables available throughout the entire workflow
- Configure the global timeout for the workflow execution
- Set the execution policy — whether the workflow stops or continues when a task raises an exception
The Start task itself performs no action during execution (it returns immediately). Its role is purely declarative: it configures the runtime context (AndroMateContext) that all subsequent tasks will share.
Input parameters
| Parameter | Type | Required | Possible values | Android Compatibility | AndroMate Compatibility | Default |
|---|---|---|---|---|---|---|
Time_out |
Long | No | Duration in milliseconds, 0 = no timeout |
Android 13 (API 33) → Android 16 (API 36) | 1.1.0 → 1.1.0 | 0 |
exec_policy |
Integer | No | 1 = Continue on error, 2 = Stop on error |
Android 13 (API 33) → Android 16 (API 36) | 1.1.0 → 1.1.0 | 1 (Continue) |
variables |
Array | No | List of variable objects (see below) | Android 13 (API 33) → Android 16 (API 36) | 1.1.0 → 1.1.0 | [] |
Variable object structure
Each entry in the variables array defines one workflow variable:
| Field | Type | Required | Description |
|---|---|---|---|
variableName |
String | Yes | Name of the variable — must start with $ (e.g. $my_var) |
variableValue |
String | No | Initial value of the variable |
is_kpi |
Boolean | No | If true, this variable is tracked as a KPI and included in the job result |
Output parameters
The Start task produces no outputs. It returns immediately with no result value.
Exceptions
The Start task does not raise any exceptions.
Execution flowchart
flowchart TD
A([▶ Start Parsing]) --> B[📋 Read Time_out\ndefault: 0]
B --> C[📋 Read exec_policy\n1=CONTINUE / 2=STOP]
C --> D[📋 Read variables array]
D --> E[🔧 Initialize AndroMateContext\nvariables · timeout · policy]
E --> F[📌 Set graph entry point\nstartId = node id]
F --> G([✅ Context ready\nWorkflow begins])
style A fill:#e3f2fd
style G fill:#c8e6c9
style E fill:#fff9c4
style F fill:#f3e5f5
How it works:
- Read
Time_out: Loads the global workflow timeout in milliseconds (0= no limit) - Read
exec_policy: Loads the execution policy —CONTINUE_ON_ERROR(default) orSTOP_ON_ERROR - Read
variables: Loads the variable list with their initial values and KPI flags - Initialize context: Creates the
AndroMateContextshared by all tasks in the workflow - Set entry point: Registers this node's
idas the graph traversal starting point - Workflow begins: The engine starts executing the next connected task
Parameter details
1. Parameter: Time_out
Defines the maximum execution time allowed for the entire workflow, in milliseconds.
Example
Details
- A value of
0means no timeout — the workflow runs until it reaches an END node or an unrecoverable error. - If the workflow exceeds this duration, execution is interrupted.
- Recommended for long-running workflows to prevent infinite loops or blocking tasks.
2. Parameter: exec_policy
Defines the behaviour of the engine when a task raises an exception.
| Value | Constant | Behaviour |
|---|---|---|
1 |
CONTINUE_ON_ERROR |
The workflow continues to the next task even if the current one failed. The exception is stored in context and can be inspected with the Exception ? task. |
2 |
STOP_ON_ERROR |
The workflow stops immediately when any task raises an exception. |
Example
Details
- Default value is
1(CONTINUE_ON_ERROR) when the field is absent or set to an unknown value. - With
CONTINUE_ON_ERROR, you can useException ?nodes after critical tasks to handle errors explicitly. - With
STOP_ON_ERROR, any task failure terminates the workflow immediately — no branching needed.
3. Parameter: variables
Declares the list of variables available for the entire workflow. Each variable can be read or written by any task.
Variable fields
| Field | Description |
|---|---|
variableName |
Unique name starting with $. Used as a placeholder in task parameters (e.g. $url, $result). |
variableValue |
Initial value as a string. Can be empty "". |
is_kpi |
If true, this variable's final value is exported in the job report as a KPI metric. |
Example
"variables": [
{
"variableName": "$server_url",
"variableValue": "https://example.com",
"is_kpi": false
},
{
"variableName": "$ping_result",
"variableValue": "",
"is_kpi": true
}
]
Details
- Variables are resolved at runtime — any task parameter containing
$variable_nameis automatically replaced with the current value. - A variable not declared in the Start node cannot be used in other tasks.
- KPI variables (
is_kpi: true) are collected at the end of the job and sent to the backend as performance indicators.
Complete JSON example
{
"Start": [
{
"id": "0",
"title": "Initialize Workflow",
"Time_out": 120000,
"exec_policy": 1,
"variables": [
{
"variableName": "$server_url",
"variableValue": "https://example.com/api",
"is_kpi": false
},
{
"variableName": "$http_status",
"variableValue": "",
"is_kpi": true
},
{
"variableName": "$error_code",
"variableValue": "",
"is_kpi": false
}
]
}
]
}