Creating Chain Definitions with Parameter Handling
You override chain processes parameter values using chain definition parameters or map them to parameters of other chain processes.
There are two parameter classes, scheduling parameters and process parameters. Scheduling parameters define the status of the chain at submit time, the queue or the priority, for example. Chain Processes have additional scheduling parameters that control start time and the behavior of the step.
For some processes, like OS processes or SAP jobs, the queue defines the system where the process runs.
Chain process parameters have the following levels:
- chain definition level parameters, which are filled at submit time and can be common to one or more processes.
- chain process level parameters, which are individual.
Parameter Direction
Parameters have three directions: IN, OUT and IN/OUT. You can map chain definition parameters to individual chain processes as well have a chain process modify a parameter and pass the modified parameter on to another chain process.
The IN parameters are constants defined at submit time; they are read-only. The Out parameters have no default value and can be filled/modified by individual chain processes; once an OUT parameter has been filled, it can be used by other chain processes. The IN/OUT parameters have a default value and can be modified by individual chains. At any time, you can map a parameter's IN or OUT value, as they are saved individually. The OUT value of an unmodified IN/OUT parameter is its IN value; the value you specified at submit time.
note
The data type must always match when you map parameters. For example, most built-in process definitions have string parameters.
note
The Display Order of parameters is also the order in which parameters are resolved. If you use Redwood Expression Language to define a parameter based on the value of another parameter, the parameter in the expression must have a lower Display Order than the parameter it defines or the latter will not get resolved.
Procedure
- Choose "Definitions > Chains" in the Navigation bar.
- Choose New Chain Definition from the context-menu.
- Choose the &Chain Definition tab and fill in a name for the &Chain Definition, choose Save.
- Choose Add Step from the context-menu, notice that a new step with the caption Step 1 has been added.
- Choose Add Process from the context-menu of Step 1.
- Choose Process 1 and enter the part of the process definition name into the Process Definition field.
- Choose the desired process definition out of the list of available processes.
- Under Scheduling, enter a parameter for Queue.
- If
process level
parameters are required: - Choose the appropriate process.
- Fill in the desired value in Expression.
- If
chain definition level
parameters are required: - Choose the appropriate parameter under Reference.
- Choose Save to save the changes made to the chain definition.
Example
Create a chain definition with two steps, each step containing one process. Use a chain definition parameter and map it to the parameter of the first process of step Step 2.
- Choose "Definitions > Chains" in the Navigation bar.
- Choose New Chain Definition from the context-menu.
- Choose the Chain Definition tab enter MSLN_GL_INV_IN in the Name field.
- Fill
System
into the Queue field. - Choose MSLN_GL_INV_IN on the Chain Definition tab.
- Choose Add Step from the context-menu.
- Choose Step 1.
- Choose Add Chain Process from the context-menu and choose the newly created box.
- Enter Sleep into the Process Definition field.
- Choose System_Sleep from the list of available processes.
- Fill 10 into the Priority field.
- Choose MSLN_GL_INV_IN.
- Choose Add Step.
- Choose Step 2, choose Add Chain Process from the context-menu and then choose the newly created box.
- Enter Sleep into the Process Definition field.
- Choose System_Sleep from the list of available process definitions.
- Enter the value System into the Queue; note that this task is optional here, as this queue has been defined as default queue of the chain definition, and will be used by default for this process as well.
- Choose the Parameters tab.
- Choose a row.
- Fill SleepTime into the Name field.
- Select Number in the Type field, the default value was String.
- Fill
1
into the Display Order field. - Fill
2000
into the Default Expression field. - Choose Save.
- On the chain definition tab, expand Step 2, choose Sleep.
- Expand Time to Sleep and select MSLN_GL_INV_IN:SleepTime in the Reference field.
- Choose Save & Close to save the process.
Submit the Chain Definition
- Navigate to "Definitions > Chains" in the Navigation bar.
- Choose Submit from the context-menu of the chain definition MSLN_GL_INV_IN.
- Fill
3000
into the SleepTime field; note that the default value of the chain definition is2000
and the default of the process definition is1000
. - Choose Next, and Next again.
- Fill System into the Queue field, and choose Submit.
See Also
JobChain