Declaring Steps with Desktop SDK
Declare the Step
A step is declared in a process or an application using the step method.
The parameter of this method is a callback function (named step handler), where you implement the code to be executed when the step starts. This callback receives the following parameters:
-
ev : current (last received) event
-
sc : parent scenario (seClass ctx.scenarioClass )
-
st : this step object (see Class ctx.stepClass )
Implement the Step Code
You can implement any code inside the step handler:
-
Initialization code
-
Controlling code
-
Event handlers
-
and so forth
Make sure that code implemented outside Event handlers is executed when the step starts.
End the Step
You must end the step by calling the endStep method:
Calling endStep without parameter starts the next step declared in the scenario list (see Declaring Scenarios with Desktop SDK.)
If the step is the last one in the scenario list, the scenario automatically stops
Example: