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.
|Parameter Name||Parameter Type||In/Out||Description|
|Alternative Scenario If Failed||Boolean||Input||checkbox; default is "on"|
|BCC Scenario Name||String||Input||scenario name from BCC|
|Delegate to BCC||Boolean||Input||checkbox; default is "off"|
|Display Name||Literal||Input||you can change the name of activity for greater clarity of the scenario|
|Exclude from Transaction Check||Boolean||Input||checkbox; default is "off"|
|Scenario||Dropdown||Input||choose the name of the scenario from dropdown list|
|Scenario File Path||String||Input||full path to subscenario path|
|Scenario Source||Dropdown||Input||select the appropriate option from the dropdown list|
|Result||Boolean||Output||returns the Boolean value: it will return True if no error is in activity, otherwise it will return False|
|Result Code||Int32||Output||Result Code will return 0 if there is no error in activity, otherwise in most cases it will return 1, the extended result code will show only in several chosen activities|