Back Forward Using the Queue instruction to run an activity asynchronously

Methods and instructions by function

Use the Queue instruction to start asynchronous execution of a second activity. This provides an alternative to the Call instruction, in situations where there is no need to wait for completion of the second activity, or where processing in parallel is feasible and beneficial.

Parameters

The Queue instruction using no parameters itself. Supply values for the parameters (if any) of the activity.

Parameter

Description

Activity (entered in the Method field)

zzzType Queue followed by one space and the Activity Name (second key part) of the activity to execute.

Optionally, you can identify the Applies To key part of the called activity explicitly, using the format:

Call Data-Admin-Operator-ID.Analyze

Call MyCo-Finance-Work-Form990.Validate

NoteThe explicit class format causes rule resolution to bypass all class hierarchy searches — the activity must be present in the specific class identified before the dot. (Other aspects of rule resolution operate normally.) Because use of explicit class names can introduce inflexibility, complicate debugging, and reduce opportunities for rule reuse, avoid this format whenever possible. When you save an activity, Queue steps that use this format cause a rule warning.

Pass current parameter page

Check to share the contents of the current activity with the called activity (a form of call-by-reference). If checked, ensure that all needed input parameters of the called activity are present with an appropriate value on this page before the Queue instruction occurs.

CautionUse care if you select this option. As both the calling and calling activities can update any Out parameter values on a common, shared parameter page, changes to the parameter page may occur in any order.

()

If Pass current parameter page is not selected, enter values for the input parameters of the activity. Input parameters that are required to have a non-blank value are marked with an asterisk.

Results

At runtime, the system uses rule resolution to locate and start the activity.

Execution of the queued activity occurs asynchronously, in a child requestor. The execution progress of the two activities is not predictable and may vary from execution to execution.

Checking the method status

This method updates the pxMethodStatus property only if it fails. See How to test method results using a transition.

Definitions transition
Related topics Call instruction

zzzMethods and instructions by function