Define Workflow Events in AppObject
- Last UpdatedJun 10, 2024
- 5 minute read
The Gateway object should be configured before associating an event for the AppObject. In the example below, you will associate an event to the Drum_Conveyor object.
The Drum_Conveyor object has an attribute named Cycle, which changes when the drum is moved in the conveyor. This value varies from one to six, based on the different stages covered by the drum.
For example, the Starting of the Drum Movement in conveyor is marked as 1 and the Cycle Attribute and Falling of the Drum due to any issue in the conveyor is marked as 6. You will define an event to trigger a workflow when the attribute value changes to '6'.
To define workflow events in AppObject
-
Open the Drum_Conveyor object and select the Workflows tab.
-
Click the Add Event button to add a new event.
For example, HazardousSpill.
The event gets added to the Events list.

-
Select a Workflow Gateway instance that contains the connection information to AVEVA Work Tasks, and then click Select.
-
Select the event from the Events list.
The event association window appears on the lower right of the screen as shown in the following image:

The following options are available in the event association window:
-
New Workflow: Use this option to create a new workflow to be associated with the event.
-
Existing Workflow: Use this option to associate an existing workflow with the event.
-
Manage Workflow: Use this option to open the workflow list for managing the workflow.
-
View: Use this option to view the selected workflow in a read only mode in the Process Designer. This eliminates the need to unpublish a published workflow to view it.
-
Save As: When a workflow is first saved, it is saved with version number 1.0. The Save As option enables you to save the workflow with a different version.
The versioning scheme for workflows is as follows:
-
Next Version: This option adds 1 to the lowest level of the last saved workflow version. If the last saved version is 1.1.1, then selecting this option saves the workflow as 1.1.2.
-
Next Minor Version: This denotes a minor version for the last saved version. If the last saved version is 1, the next minor version would be 1.1. If the last saved version is 1.1, the next minor version would be 1.1.1.
-
Next Major Version: The next major version increments the workflow version by 1. If the last saved version is 1.1.1, selecting this option assigns 2 as the version number.
-
Specific Version: Select this option to view a list of the next version numbers under the above three options.
The version number in Workflows list is updated with the last saved version number (if all the versions are in draft) and the version with which it is published if the workflow is published -
View All Versions: This option enables you to view all the versions of the selected workflow.
-
-
Set the Event Expression.
For example, set the Event Expression as Me.Cycle == 6.
-
Set the Event context parameters that you want to pass to the workflow. Click
to add the parameter.

-
Set the event contextual parameters to be passed to the workflow when the event is fired.
On True is the default Trigger type. The AVEVA Work Tasks Event conditions can be configured using the following trigger types:
-
On True (Default): The workflow gets triggered when the condition specified in the Event Expression is True.
For example, the Trigger Type is selected as On True and the event expression is set as Me.Cycle==6, the workflow gets triggered only when the event expression is True. -
On False: The workflow gets triggered when the condition specified in the Event Expression is False.
For example, the Trigger Type is selected as On False and the event expression is set as Me.Cycle<6, the workflow gets triggered only when the event expression is False. -
Periodic: The Time Period field is enabled when the trigger type selected is Periodic. The workflow gets triggered at specific intervals as specified in the Time Period field. The default value for Time Period is 5 minutes. This trigger does not require an expression.
For example, the Trigger Type is selected as Periodic and Time Period is set as 1:00, the workflow gets triggered periodically after every hour. -
Data Change: The Deadband field is enabled when the Trigger Type is selected as Data Change. The Deadband prevents the trigger to be raised again and again, if the event expression value moves around a specific target.
For example, the Trigger Type is selected as Data Change and the event expression is set as Me.Cycle==10. The Deadband value is set as 2. The trigger is raised when the event expression's value reaches 10. The trigger would be raised again only when the event expression's value reaches below 8.The following image shows the Event context parameters set for the example scenario:

-
Note: You can use relative referencing support at the Event Context Parameter level and for the attribute read or write at the AttributeReadWrite activity level. You can use relative references like MyContainer, MyPlatform, MyEngine, MyArea, and Me.