Previous Topic: Child ProcessesNext Topic: Initialize Child Process Variables with the Caller and Process Keywords


Configure a Child Process

Configure the Start Process operator in a parent process to control the behavior of the child process it is starting.

Follow these steps:

  1. Open and check out a process in the Process Designer.
  2. In the Operators palette, expand Process Control and drag a Start Process operator into your process.
  3. Double-click the Start Process operator to view its properties in the Properties palette.
  4. Expand the Start Process group.
  5. In the Process Name field, enter the full path to the process.
  6. In the Process Dataset Initialization Code field, click the Browse button indicated by ... (ellipsis) to open the full scripting dialog.
  7. Enter JavaScript statements to initialize variables in the dataset of the child process that you are starting. In this context, the Process keyword refers to the process dataset of the new instance being started. The Caller keyword refers to the dataset of the parent instance containing the Start Process operator. This context is the only one in which the Caller keyword is available. This context is also the only one in which the Process keyword does not refer to the process that contains an operator.

    The Process and Caller keywords are mandatory for referring to parent or child process dataset variables. If you omit both keywords on a variable name, the application looks for a calculation-scope variable. It does not check for a similarly named variable in either the parent or child dataset. For example, the following code fails if no calculation-scope variable X was previously created in the local script dialog:

    Process.X = Caller.X;
    Process.Y = X + 100;
    
  8. Click Save to close the Initialization Code dialog.
  9. In the Mode field, select Attached, Detached, or Inline.

    If you select Detached, the Start Date field becomes enabled. It specifies the date when the detached instance of the process starts. The default value is the date when the operator runs, indicated as System.Date. Similarly, the Start Time field specifies the time when the detached instance starts. The default value is System.Time.

Note: Previous versions of this application included separate Run Process operators for attached mode and detached mode. Both operators actually performed the same function. The only difference was that for the operator placed with Run Process, the Detach after start or after queuing request check box is initially cleared. For the Run Detached Process operator, the check box was initially selected. In either case, you could select or clear the Detach After Start or After Queuing Request check box anytime after you placed the Run Process operator to change its start mode. In this release, all of these operators are imported as Start Process operators.