Skip to main content
Skip table of contents

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: Run: Start Technical Process

Parameter

Adapter

Main class of the adapter (do not change!)

Possible values: de.softproject.integration.adapter. processstarter.ProcessStarter: Main class (default)

User

User ID (X4DB user folder where the Technical Process to be started is located)

Possible values:

  • Any valid user ID (e.g. 999)

  • 1: Default user folder (default)

Process

Repository path to a Technical Process that has the In service: true property.

Possible values: Any path in the X4 repository without leading slash (e.g. Project/Folder/Process.wrf)

synchron

Execute Technical Process synchronously or asynchronously

Possible values:

  • True: Wait until the started Technical Process instance is terminated and output its result if necessary, see below (default).

  • False: Output the Technical Process instance ID in an XML document and immediately execute the following Technical Process step, see below.

forceNewThread

Start a new thread even if executed synchronously

Possible values:

  • True: Start a new thread on synchronous execution; This option allows to better manage the state associated with the threads, e.g. for transactions. (default)

  • False: Do not start a new thread when executed synchronously (original behavior).

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 1, it does not necessarily mean that the started Technical Process outputs a result.

The Technical Process to be started is either not active (property In service: false) and was therefore not executed, or empty blocks are used in the started Technical Process, or the started Technical Process outputs the status 0.

-1 

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 ConditionState, see Dynamic state values with ConditionState.

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 Stop on error: true.

Notice:

  • If a synchronously started Technical Process returns a status value between 950 and 999, this status is changed by the Process Starter (status value minus 50) and status values between 900 and 949 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).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.