Invoker

Scenario Invoker

This activity is used to nest scenarios within one another. The nested scenario is called subscenario. Subscenario should be placed in one of these folders (the robot collects data from all these three places):

    • C:\Program Files (x86)\First Byte\WizlinkDesigner\SubScenarios
    • C:\Users\[...]\AppData\Local\Wizlink\SubScenarios
    • C:\ProgramData\Wizlink\SubScenarios

Put the activity Scenario Invoker in the main scenario. Click green circular arrow to let robot check all three aforementioned disc localisations in search for subscenarios, then choose the right one from the dropdown list.

invoker_sc1

If the sub-scenario 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 icon of a black circle with the letter "i", parameter name will appear and a note that you placed in the Description column in Scenario Invoker Parameters tab in the subscenario, during creating parameters.

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.

 

NOTE: when Wizlink® finds two or more files (subscenarios) with the same name, sets Result to False, so be carefull not to have copies of subscenarios in any of aforementioned localisations.

NOTE: some folders (like AppData) may be hidden. To view hidden folder you have to open File Explorer (Win key+E), select: View > Options > Change folder and search options, then select the View tab. In Advanced settings of the View tab select Show hidden files, folders, and drives, click OK.

invoker_sc2
Parameter nameParameter TypeIn/OutDescription
Alternative Scenario If FailedBooleanInputcheckbox; default is "on"
DisplayNameLiteralInputyou can change the name of activity for greater clarity of the scenario
ResultBooleanOutputreturns the Boolean value: it will return True if no error is in activity, otherwise it will return False
Result CodeInt32OutputResult 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