Process Starter
The adapter executes a Technical Process in any user folder in <X4>/X4DB
with a Technical Process instance ID synchronously or asynchronously. As input, the started process receives the input of the adapter. If the function adapter is executed asynchronously, then the adapter immediately outputs an XML document containing the Technical Process instance ID of the started Technical Process; if the function adapter is executed synchronously, then it waits for and outputs the result of the started Technical Processs (if any).
With the Process Starter, you can use dynamic parameters to set the process name (and path) at runtime. In addition, each Technical Process started via the Process Starter Adapter has its own Technical Process instance ID, is executed in a separate thread, and therefore cannot access variables of the calling process.
General properties and parameters
Properties
Operation | Determines which operation the adapter executes Possible values: |
Parameter
Adapter | Main class of the adapter (do not change!) Possible values: |
User | User ID (X4DB user folder where the Technical Process to be started is located) Possible values:
|
Process | Repository path to a Technical Process that has the Possible values: Any path in the X4 repository without leading slash (e.g. |
synchron | Execute Technical Process synchronously or asynchronously Possible values:
|
forceNewThread | Start a new thread even if executed synchronously Possible values:
|
Synchronously started Technical Processes
If you start Technical Process synchronously (with parameter synchron
: True
), then the adapter waits until the started Technical Process has been completely executed and, if necessary, outputs its result including status code before executing the next process step.
Status values
| (Or any other positive value) The adapter was successfully executed synchronously. The status code of the synchronously started Technical Process is taken over by the Process Starter or, if necessary, output modified (see note below). If the adapter outputs status |
| The Technical Process to be started is either not active (property |
| The adapter could not be executed (the Technical Process to be started was not found or the started Technical Process throws errors). |
(Any negative value) | The started Technical Process may have been executed and generated a negative state value, e.g. via an XSL mapping with In case of asynchronously started Technical Processes, their status is taken over by the Process Starter. Further process execution is aborted if the process property |
Notice:
- If a synchronously started Technical Process returns a status value between
950
and999
, this status is changed by the Process Starter (status value minus 50) and status values between900
and949
are output. This is necessary in order not to influence the Save Point function of the X4 server. - If a synchronously started Technical Process returns a status value between
-999
and-950
, this status is changed by the Process Starter (status value plus 50) and status values between-900
and-949
are output. This is necessary to avoid errors in the process execution.
Asynchronously started Technical Process
If you start Technical Processes asynchronously (parameter synchron
: False
), then after the called Technical Process is started, its process instance ID is output in an XML document and the immediately following process step is executed.
Status values
1 (successful) | The function adapter was successfully executed asynchronously. If the started Technical Process is not active (property In service: false) or throws errors, then status 1 is still output; the result XML document contains the process instance ID -1 in these cases. |
-1 (error) | The function adapter could not be executed (the Technical Process to be started was not found). |