Scenario Invoker
Activity is used to pause a currently executed scenario in order to invoke (run) another one. The nested scenario is usually referred to as a Subscenario.
You can choose whether Debug mode will stop on breakpoints within the subscenario or not by checking Stop on Subscenario Breakpoints in properties.
In order to run a subscenario it needs to be located in a specific place accessible to Wizlink. Use the Scenario Source Dropdown, to choose between Local Folder, Direct File Path and BCC.
By default Wizlink expects Subscenarios in the C:\ProgramData\Wizlink2\SubScenarios folder.
Direct File Path is mostly used during coding or testing. Any path input in this field needs to be literal (no quotation marks), not a String value.
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 Bot Control Center Scenarios selection window will appear.
Once you fill in the name/path to the subscenario, if it contains parameters Input and Output parameter fields appear in the activity box.
Click on Update parameters activity block button to refresh the list of parameters.
Clicking on Open subscenario in Designer activity block button will open the chosen subscenario in a new Wizlink window.
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 subcenarios, 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 developers – 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 (ie. logging to a web application)
| Name | Type | Category | Description |
|---|---|---|---|
| BCC Scenario Name | String | Input | scenario name in BCC |
| Delegate to BCC | Boolean | Input | checkbox; default is "off" |
| 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 |
| Alternative Scenario If Failed | Boolean | Misc | checkbox; default is "on" |
| Display Name | Literal | Misc | changes display name of the activity |
| Stop On Subscenario Breakpoints | Boolean | Misc | 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 |
| Fullscreen | Boolean | Screenshot | checkbox; default is "off" |
| Screenshot Path | String | Screenshot | directory path to save location |
| Show Cursor | Boolean | Screenshot | checkbox; default is "off" |
| Window Screenshots | Boolean | Screenshot | checkbox; default is "off" |