The following properties define conditions to meet before you run an operator, and actions to perform before and after the operator runs. You can find these properties in the operator Execution Settings.
Lets you add code that runs before an operator runs. You can run any JavaScript code. JavaScript code runs before the operator runs. Pre-execution code manipulates the operator and process dataset in such a way that the dataset can be used as input for the operator. In other words, you can manipulate the output parameters from a previous operator dataset and then use them as input for a later operator.
Pre-execution code can perform various tasks. For example, the following code sets a Process-level variable:
if(Process.username==null)
{
Process.username="testuser"; }
Note: For more information about adding code, see the Run JavaScript operator.
Before the pre-execution code finishes and the operator runs, the operator has to reach the code CanExecute = 1. The process variable CanExecute is added by default to the operator. The default CanExecute value is 1. If you do not change the default, the operator runs. This requirement lets you verify external conditions and proceed only when an expected condition is met.
If you change the CanExecute value to 0 (Process.CanExecute =0), the operator does not run. CA Process Automation waits 30 seconds, then reruns the pre-execution code.
When there is no pre-execution code, the operator runs immediately. For example, you could use pre-execution code to set up loop variables or other variables to use as part of the operator.
For the code that runs in the operator, you can use the following syntax to access the operator dataset:
Process[OpName].fieldname
For example, the following code creates an operator dataset variable named iNow that contains the following data:
Process[OpName].iNow = System.Host + ":" + System.Date + ":" + System.Time;
Lets you add code that runs after an operator completes. For example, you could use post-execution code to modify loop variables or to process the results of an operator.
For the code that runs in the operator, you can use the following syntax to access the operator dataset:
Process[OpName].fieldname
For example, the following code copies the value of the operator dataset variable named Result to variable named iResult:
Process.iResult = Process[OpName].Result;
Specifies that the selected operator in a process must run under the identity of the authorized user who started the process. This requirement is true whether the entire process is running as the owner or not. Run as Caller User lets process designers run processes that:
|
Copyright © 2014 CA.
All rights reserved.
|
|