Command
Command Usage
The incoming input parameter values are processed to generate new parameter values.
These generated results can then be used as inputs in any rule.
How to Define It?
On the "Rule Parameter" > "Command" page, all existing commands are listed.
To define a new command, click the “New” button to open the definition screen.
Command Definition Steps
Select the return type (output data type) and the data template of the command.
Define the inputs to be used within the command.
These inputs can be:
Parameters
Another rule
Or another command
Command Writing
Scripts can be written within commands using JavaScript notation.
To access the input values within the command, the following method is used:
Pulsar.get("CODE")Here,
CODErefers to the code of the relevant parameter, rule, or command.
function f() {
var amount = Pulsar.get('TOTAL_AMOUNT');
return amount*0.1;
}
f();Using a Command in a Rule
The result of a command can be used as an input parameter in another rule.
On the rule definition page, you can add a command by clicking the “Add Command” button in the input parameters section.
Execution Order
When the rule is triggered, the inner command is executed first.
Then, the rule runs using the result of that command.
Last updated