Scenario Invoker
This activity is used to nest scenarios within one another. The nested scenario is called subscenario. Subscenario should be locateded in a specific place for Wizlink to be able to use it. Scenario source opens a dropdown list to choose: local folder, direct file path, BCC.
Subscenarios are regularly located in C:\ProgramData\Wizlink2\SubScenarios. Direct file path is mostly used during coding or testing. If your scenario will run under BCC control - you should place your subscenario in BCC. When you click on the downward arrow in activity box - the bcc scenario selection window will appear.
Put the activity Scenario Invoker in the main scenario. Choose the source (Local folder) and name of the subscenario. If the subscenario contains parameters, the Input parameters and Output parameters lines appear in the activity box. Make sure each parameter has a corresponding variable in the main scenario.
When you hover the mouse over the blue button with the letter "i", Type of the variable, parameter Name and Description will appear. The Description is a note you put in Description column in Scenario Invoker Parameters tab in the subscenario, during creating parameters.
When one puts a tick in Delegate to BCC checkbox (in Properties window) the subscenario will be executed as a task in BCC and its result will be returned to the output arguments of the activity.
NOTE: if the scenario downloads a given subscenario from the BCC and executes it, all subsequent runs of it (subsequent calls to the Scenario Invoker activity) will perform exactly the same version of the subscenario. The subscenario is downloaded once, according to the Valid from date of the package that the subscenario comes from and the main scenario does not check if the validity period of the subscenario has expired, even if the package's tasks are performed at a certain interval.
NOTE: you can specify other locations for subcenario, simply set path as environment variable (WIZLINK_SUBSCENARIOS_PATH).
Advantages of using subscenarios:
-
- significantly lightening the main scenario;
- ease and convenience of navigating within the main scenario;
- subscenario and main scenario may be coded by different programmers – the only thing that needs to be determined is the way of data transmission between main scenario and subscenario (variables and parameters);
- the same subscenario may run in many main scenarios;
- the subscenario may run on its own also.
Acquired Text | String | Output | text input by user |
---|---|---|---|
Alternative Scenario If Failed | Boolean | Input | checkbox; default is "on" |
BCC Scenario Name | String | Input | scenario name in BCC |
Delegate to BCC | Boolean | Input | checkbox; default is "off" |
Display Name | Literal | Input | changes display name of the activity |
Exclude from Transaction Check | Boolean | Input | checkbox; default is "off" |
Result | Boolean | Output | returns a Boolean value. True if no error in activity, otherwise will return False |
Result Code | Int32 | Output | Result Code will return 0 if there is no error in activity, otherwise in most cases will return 1. See the table of Extended Result Codes for more info |
Scenario | Dropdown | Input | select name of scenario from the dropdown list |
Scenario File Path | String | Input | directory path to scenario file (file name and extension included) |
Scenario Source | Dropdown | Input | select the appropriate option from the dropdown list |