What are Exclusion Groups?
Exclusion Groups are used to group Actionflows and limit their ability to run at the same time.
Where multiple Actionflows have the same exclusion group, only one Actionflow will be able to run at any one time. Attempting to run a second Actionflow, with the same exclusion group, will return a warning message and the Actionflow will not run. This applies whether the Actionflow is run manually or automatically using a schedule.
Exclusion groups are evaluated before any Actionflows are started. When an Actionflow with an exclusion group is triggered, if no other Actionflow with the same exclusion group is already running then the Actionflow will continue. The action will be considered to be using this exclusion group from this point until the Actionflow has completed.
Setting Exclusion Groups
- Open an Actionflow and open its
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
- Under Basic Settings, populate the Exclusion Group field with any text to indicate the group
- This field is case insensitive and can take any free text
- Repeat this with other Actionflows to add them to the same Exclusion Group
Worked Example
Here's a worked example using the Company Data (available from the Learning Centre).
In this example, we are using:
- A Company Orders screen containing two grids of the Orders and OrderLines data - this screen was created using the Multi-tile template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Advanced Application. For this example, we'll be working on the Company Orders screen. |
In this example, we'll create an Actionflow to import the AdditionalCompanies_Processed data and add the Status of New to each company on that table before adding it to the Companies table. We'll add this Actionflow to an Exclusion Group with other Actionflows on the same screen so that other processes cannot be triggered while the import is taking place.
Actionflow Setup
- Open the Company Approval Review screen
- Create an Actionflow on the Import button to import the AdditionalCompanies_Processed data
- Name:
ImportCompanies
- If you have completed the Actionflow Intermediate Course, chapter 2.15 16 Analysis Action Configuration, this Actionflow setup is similar
- Configure an input of On Click
- Add a
Insert excerpt |
---|
| _action_calculate |
---|
| _action_calculate |
---|
nopanel | true |
---|
|
action to the canvas- Name:
Add Details
- Connect the node to the Calculate action
- On the Calculate action, add the following Output Attribute that will be used to update the Status of all imported companies:
- Name:
Status
- Type:
String
- Expression:
"New"
- On the Calculate action, add another Output Attribute that will be used to add a 20 second delay into the Actionflow, this will simulate a large data import and allow time to trigger the Actionflow twice:
- Name:
Delay
- Type:
Integer
- Expression:
sleep(20)
- This will add a delay into the Actionflow for demonstration purposes. See sleep
- Add a
Insert excerpt |
---|
| _action_analysis |
---|
| _action_analysis |
---|
nopanel | true |
---|
|
action to the canvas - On its Properties, in the Tables section, click the
Insert excerpt |
---|
| _tables |
---|
| _tables |
---|
name | icon |
---|
nopanel | true |
---|
|
icon- Drag across the AdditionalCompanies_Processed table from the Repository to the Analysis action properties
Connect the Calculate action to the Analysis action and map across the Status attribute
Expand |
---|
|
|
Table Attributes Setup
- On the Analysis Model, Actionflow Advanced Data, click on the table, AdditionalCompanies_Processed
- Double-click on the attribute, Status, and change the Expression to
_context.Status
- This is then referring to the attribute setup on the Calculate action
- See 2.15 16 Analysis Action Configuration and Internal Variables for more information on the internal variable _context
- Save the Analysis Model
Combine Data & Display
- On the Actionflow, create a
Insert excerpt |
---|
| _action_view |
---|
| _action_view |
---|
nopanel | true |
---|
|
action with the Primary Table, AdditionalCompanies_Processed, and connect the Analysis action to the View action- In the Properties for the View, in the Data Retrieval Options section, set the Data Range to Latest
- This will ensure that this data isn't continuously added if the Actionflow is run repeatedly
- For the Output Attributes section, click the
Insert excerpt |
---|
| _attributes_icon |
---|
| _attributes_icon |
---|
nopanel | true |
---|
|
icon and drag across all attributes - Save the properties
- Create a
Insert excerpt |
---|
| _action_save |
---|
| _action_save |
---|
nopanel | true |
---|
|
action to save the data to the Companies table- In its Properties, in the Basic Settings section, set the Type to Insert and
Insert excerpt |
---|
| _toggle_on |
---|
| _toggle_on |
---|
nopanel | true |
---|
|
toggle on Auto Save Attributes
- Connect the View to the Save action and map across all attributes
- Note: Map the attribute, Status from the View action (not the Calculate action) and map the attribute Name to CompanyName
Expand |
---|
|
|
Setting the Exclusion Group
- Open the Actionflow
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
- Under Basic Settings, populate the Exclusion Group field with any text, e.g.
Import
Add the same Actionflow to the Import button the Company Management screen
Expand |
---|
|
- On the ImportCompanies Actionflow, open the
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
| using the toolbar option and the Actionflow tab - Open the Company Management screen and drag the Actionflow icon from the pinned tab onto the Import button
-
- This will create another instance of the same Actionflow
- Configure the Input of On Click
|
Testing
- Open the Company Approval Review and Company Management screens
- Ensure both screens are ed
- Click Import on one screen then press Import on the other screen
- A warning message should appear
Image Removed
3.06 Actionflow Security and Permissions