Executing Scripts

Scripts that are part of a workflow are processed at workflow activation time, provided the Generate Job at Runtime option is NOT selected on the workflow Attributes page. During runtime, its status changes to Finished. Scripts can also run in dialog mode. For this purpose you create input masks using the :READ script statement. The system assumes that users who are logged on to the User Interface at this point can react to these masks.

Script objects do not go through an execution stage as other executable objects do; they end as soon as they have been generated and their status changes to Finished during runtime. For this reason, their behavior is slightly different.

Runtime Parameters with Script Objects

All executable objects have two possibilities in terms of generation times, namely, generate at activation time or at runtime. You define them on the Attributes Page:

The implications of the two generation possibilities for Script objects are as follows:

Runtime setting

Implication

Generate Job at Runtime

 

The runtime refers to the duration from start until the end time.

In restarts, the runtime is always "0".

Generate Job at Activation Time

The runtime is always "0".

Regardless of this setting, when processing an executable object the system always checks both Sync object dependencies and the maximum number of simultaneous tasks that are allowed after the object has been generated.

As Script objects end right after generation, if the Generate Job at Runtime has been activated, these checks take place before their generation stage. Otherwise, for Script objects these settings have no effect whatsoever.

Synchronization and Maximum Number of Parallel Running Tasks

In executable objects, the system always checks Sync objects and the maximum number of parallel running tasks after they have been generated regardless of the Generate Job at Runtime setting. As there is no execution stage for Script objects, they end when they have been generated.

There is only one exception to this behavior: The defined Sync object actions and the verification of parallel running tasks take place prior to the generation stage if the option Generate Job at runtime has been activated. Otherwise, these settings do not have any effect.

Running Scripts in Dialog Mode

Whether a script runs in dialog mode or not depends on what you have defined in the Runtime Parameters section in the Attributes definition page of the corresponding object:

A script runs in dialog mode if

A script does not run in dialog mode if

Use the GET_ATT script function with the DCMODUS attribute to find out whether a script runs in dialog mode or not.

See also: