Utilities

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.

v2_util_invoker5

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.

v2_util_invoker3
v2_util_invoker4

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.

v2_util_invoker22

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 TextStringOutputtext input by user
Alternative Scenario If FailedBooleanInputcheckbox; default is "on"
BCC Scenario NameStringInputscenario name in BCC
Delegate to BCCBooleanInputcheckbox; default is "off"
Display NameLiteralInputchanges display name of the activity
Exclude from Transaction CheckBooleanInputcheckbox; default is "off"
ResultBooleanOutputreturns a Boolean value. True if no error in activity, otherwise will return False
Result CodeInt32OutputResult 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
ScenarioDropdownInputselect name of scenario from the dropdown list
Scenario File PathStringInputdirectory path to scenario file (file name and extension included)
Scenario SourceDropdownInputselect the appropriate option from the dropdown list