Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

What are Exclusion Groups?

Exclusion Groups are a way used to group Actionflows that should not be running 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

  1. Open an Actionflow and open its
    Insert excerpt
    _property_settings
    _property_settings
    nopaneltrue
  2. Under Basic Settings, populate the Exclusion Group field with any text to indicate the group
    1. This field is case insensitive and can take any free text
  3. Repeat this with other Actionflows to add them to the same Exclusion Group

Image Added

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.

Example: Setting an Exclusion Group

Stop Multiple Processes Running While Performing Data Import

In this example, we'll add two Actionflows to the same exclusion group to see the warning that appears when triggering both Actionflows at the same time. This example is just for demonstration purposes.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.

Image Added

Actionflow Setup

  1. Open the Company OrdersApproval Review screenOpen
  2. the Create an Actionflow on the Edit button and open the Import button to import the AdditionalCompanies_Processed data
    1. Name: ImportCompanies 
    2. If you have completed the Actionflow Intermediate Course, chapter Analysis Action Configuration, this Actionflow setup is similar
  3. Configure an input of On Click
  4. Add a
    Insert excerpt
    _
    property
    action_
    settings
    calculate
    _
    property
    action_
    settings
    calculate
    nopaneltrue
  5. Under Basic Settings, populate the Exclusion Group field with any text, e.g. Orders
  6. Repeat these steps with the Actionflow on the Add button on the Company Orders screen
  7. On the Actionflow on the Add button, create a  action to the canvas
    1. Name: Add Details
  8. Connect the 
    Insert excerpt
    _
    action_calculate
    input
    _
    action_calculate
    input
    nopaneltrue
     action with an Output Attribute
     node to the Calculate action
  9. On the Calculate action, add the following Output Attribute that will be used to update the Status of all imported companies:
    1. Name: Status
    2. Type: String
    3. Expression: "New"
  10. 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:
    1. Name: Delay
    2. Type: Integer
    3. Expression:  sleep(20)
      1. This will add a delay into the Actionflow for demonstration purposes. See sleep
    Insert the Delay Calculate action onto the connector between
  11. Add a 
    Insert excerpt
    _action_analysis
    _action_analysis
    nopaneltrue
     action to the canvas
  12. On its Properties, in the Tables section, click the 
    Insert excerpt
    _tables
    _tables
    nameicon
    nopaneltrue
     icon
    1. Drag across the AdditionalCompanies_Processed table from the Repository to the Analysis action properties
  13. Connect the Calculate action to the Analysis action and map across the Status attribute

    Expand
    titleCheckpoint

    Image Added


Table Attributes Setup

  1. On the Analysis Model, Actionflow Advanced Data, click on the table, AdditionalCompanies_Processed
  2. Double-click on the attribute, Status, and change the Expression to _context.Status
    1. This is then referring to the attribute setup on the Calculate action
      1. See Analysis Action Configuration and Internal Variables for more information on the internal variable _context 
  3. Save the Analysis Model

Combine Data & Display 

  1. On the Actionflow, create a 
    Insert excerpt
    _action_view
    _action_view
    nopaneltrue
     action with the Primary Table, AdditionalCompanies_Processed, and connect the Analysis action to the View action
    1. In the Properties for the View, in the Data Retrieval Options section, set the Data Range to Latest
      1. This will ensure that this data isn't continuously added if the Actionflow is run repeatedly
    2. For the Output Attributes section, click the 
      Insert excerpt
      _attributes_
    input
    1. icon
      _attributes_
    input
    1. icon
      nopaneltrue
    and 
    1.  icon and drag across all attributes
    2. Save the properties
  2. Create a 
  3. Open the Company Orders screen
  4. Press Add then Edit
  5. The warning message will appear
  6. After 20 seconds, the Order Form will open
    Insert excerpt
    _action_screen_action_screen
    nopaneltrue

Testing

  1. _save
    _action_save
    nopaneltrue
     action to save the data to the Companies table
    1. In its Properties, in the Basic Settings section, set the Type to Insert and
      Insert excerpt
      _toggle_on
      _toggle_on
      nopaneltrue
       toggle on Auto Save Attributes
  2. Connect the View to the Save action and map across all attributes
    1. Image Added

      1. Note: Map the attribute, Status from the View action (not the Calculate action) and map the attribute Name to CompanyName



Expand
titleCheckpoint

Image Added


Setting the Exclusion Group

  1. Open the Actionflow 
    Insert excerpt
    _property_settings
    _property_settings
    nopaneltrue
     
    1. Under Basic Settings, populate the Exclusion Group field with any text, e.g. Import
    2. Image Added

Add Actionflow to Import Button on Companies Screen

  1. Add the same Actionflow to the Import button the Company Management screen

    Expand
    titleHow?
    1. On the ImportCompanies Actionflow, open the 
      Insert excerpt
      _property_settings
      _property_settings
      nopaneltrue
       using the toolbar option and
      Insert excerpt
      _pin
      _pin
      nopaneltrue
       the Actionflow tab
    2. Open the Company Management screen and drag the Actionflow icon from the pinned tab onto the Import button
      1. Image Added 
      2. This will create another instance of the same Actionflow
      3. Configure the Input of On Click 


Testing

  1. Open the Company Approval Review and Company Management screens
  2. Ensure both screens are 
    Insert excerpt
    _lock
    _lock
    nopaneltrue
    ed
  3. Click Import on one screen then press Import on the other screen
  4. A warning message should appear

Image Added

Image Modified