The DLM/ActionFlow platforms are rule-based, so the first thing you must do is create rules to invoke action based on your processes. A few examples of rules to drive process include invoking a build job in Jenkins based on a commit message to a specific branch in a repository, invoking a workflow in CollabNet ActionFlow to deploy a build based on a successful build message from a Jenkins job, and opening a defect in a project based on a health event from a monitoring tool like New Relic.

You can create simple rules that check for one particular condition or complex nested rules that have more than one condition to check.

Create simple rules with just one condition

  1. Log on to TeamForge and select a project from the menu.

  2. From the TeamForge tools menu, choose Project Home > DLM. The Home tab’s Value Stream Activity Console appears.

    DLM 17.4 (and later) is equipped with the ability to set up alerts. You can define alerts while creating rules (as discussed later in this procedure) and all such alerts, when triggered, are listed in the Home tab’s Value Stream Activity Console. For more information, see Value Stream Activity Console.

  3. Select the Rules tab. In the Rules section, click Create. The Create Rule page appears.
  4. In the Rule Name field, enter the name given to the rule that will be displayed in the rules list and in notifications generated by the rule.

    Enter meaningful attributes into this field to describe what the rule does. This will make it easier to understand in lists and notifications.

  5. For the Rule Enabled option, click the checkbox to enable or disable the rule. Disabling a rule prevents it from being processed by the DLM rules engine.

  6. In the Rule Description field, enter a detailed description describing the purpose of the rule.

    Include as much detail as possible to help another person understand the rule. For example, the description may include details about the parameters defined for the action on the target system.

  7. Click Source, select the source from where the event will be generated and click Save.

    The SOURCE page shows a list of all sources defined in TeamForge EventQ. These source systems generate events which may match the rule being defined. Selecting the source also tells the editor the type of event generated by the system such as commit, workitem, build, deploy, review, health and more. This allows the editor to understand the format of the message and make it easy to create the criteria for the rule.

  8. In the Criteria field, define the criteria for what events should match the rule.

    When a rule is first created it has a default criteria of Matches Any condition. This means it will match any event generated by the source system. To modify the condition, click the Matches Any link and select Edit Condition from the menu. The Add Condition dialog box appears allowing you to modify the condition.

    1. Select a message property that should be evaluated.

      The Property list displays a list of all properties defined for the message type specified by the Source system. For example, a source control system will show properties for a commit message. A tracker system will show properties for a work item message.

    2. From the Operator list, select the operator that will determine how the property will be evaluated.
    3. In the Value field, specify the value to evaluate against the property.
    4. Click Save.

Create Complex Rules with Multiple Nested Conditions

If you want to create a criteria that evaluates more than one condition such as (work_item.created_by Contains user123 AND work_item.updated_by Contains userQA) OR (work_item.status_id Equals Ready for Deploy), you can create a nested criteria as follows.

To create a rule that checks for more than one condition, click the Matches Any link and select Convert to Group from the shortcut-menu.

You now have two Matches Any conditions linked together by an “AND” operator. You can toggle between “AND” and “OR” operators by clicking the “AND” or “OR” operator.

Now, you can modify the conditions by clicking the Matches Any link and selecting Edit Condition from the menu. The Add Condition dialog box appears allowing you to modify the condition.

Click Add New to add (nest) more conditions.

  1. Select the THIS RULE GENERATES AN ALERT check box if you want to have this rule generate an alert when it’s executed.The ALERT DEFINITION section shows up.
    1. Type an Alert Name and add more Alert Details for the alert. You can add references to the these fields.

      Add References

      The source you select for a rule has a set of properties and you can insert such properties as references in your alert or action definition when you create or edit rules. For example, a Work Item source can have properties such as Assigned To (work_item.assigned.to), Created By (work_item.created_by), Work Item ID (work_item.id), Priority (work_item.priority), Tags (work_item.tags), Tracker ID (work_item.tracker_id) and so on.

      When used in action or alert description or messages, you can make the description or message generic at the time of rule creation and these references are substituted with the actual values of the properties when the rule is executed, alert is triggered or action is taken.

      Correlation (see Correlation tab discussed later in this section), if configured, makes a few additional correlation-specific properties available.

      To add references, place the cursor where you want to insert a reference in your alert name/alert details, click Add Reference, select a property from the Select Property drop-down list and click Save.

      Here’s an example of how you can use references to source properties.

      You can check for these alerts on the Rules Execution History tab after the rule is executed.

    2. Select a phase from the PHASE drop-down list.
    3. Type an EVENT ID to identify this alert.
    4. Select the severity from the ALERT SEVERITY drop-down list. Select one of the options: Info, Low, Medium or High.

    Once set up, alerts, when generated, are added to the Value Stream Activity list on the DLM Home page.

  2. Select the THIS RULE TAKES AN ACTION check box if you want to have this rule take an action when it’s executed. The ACTION DEFINITION section shows up.

    1. From the TARGET drop-down list, select the target system.

      The TARGET drop-down list shows a list of all target workflow systems. Selecting a target system populates the Action drop-down list with actions available for the event type defined by the Source system.

    2. From the Action drop-down list, select the action to take for the defined event.

      The Action drop-down list shows all available actions on the target workflow system based on the event type of the Source system. Selecting an action populates the PARAMETERS table with all the available parameters for the action. Refer to the documentation for the action in the target workflow system for purpose of each parameter. If the selected action requires input, the PARAMETERS table will be populated with the required parameters.

    3. In the PARAMETERS table, specify the appropriate value for each parameter. As each action is different, refer to the documentation for the action in the target workflow system for the purpose of each input parameter.

      Add References

      The source you select for a rule has a set of properties and you can insert such properties as references in your alert or action definition when you create or edit rules. For example, a Work Item source can have properties such as Assigned To (work_item.assigned.to), Created By (work_item.created_by), Work Item ID (work_item.id), Priority (work_item.priority), Tags (work_item.tags), Tracker ID (work_item.tracker_id) and so on.

      When used in action or alert description or messages, you can make the description or message generic at the time of rule creation and these references are substituted with the actual values of the properties when the rule is executed, alert is triggered or action is taken.

      Correlation (see Correlation tab discussed later in this section), if configured, makes a few additional correlation-specific properties available.

      To add references, place the cursor where you want to insert a reference in your parameter definition, click Add Reference, select a property from the Select Property drop-down list and click Save.

      Here’s an example of how you can use references to source properties.

      You can check for these alerts on the Rules Execution History tab after the rule is executed.

  3. Click Save. The new rule is created.

    Create as many rules you want. You can now go to the Rule Execution History tab (Project Home > DLM) to view the history of rules that are executed.

Create and Execute Manual Rules

The Manual Rule feature allows you to create rules that will be manually executed on demand from the Release Console page.

  1. From the Project Home menu, choose DLM.
  2. Click the Create Rule button.
  3. Enter all appropriate informaiton about the rule you wish to create while clicking <Button Click> (Manual) from the Source list.
  4. In the Rule Parameters section, enter the Environment ID corresponding with the environment that packages should be deployed to when this rule is executed.
  5. On the Release Console page, select the radio button next to the package you want to execute a Manual Rule for.
  6. Click the button corresponding to the Manual Rule that you would like to execute.

Audit Information for Rules

Within DLM, you can view a rule’s general information, scope, change log and the rule execution history.

From the Project Home menu, choose DLM > Rules and select a rule from the Rules section.



General tab: View/edit a rule.



Scope tab: Set the scope of a manual rule. You can restrict the scope of a manual rule so that only members with specific roles or only specific applications can execute the rule.

By default, all roles and all applications can execute a manual rule. To restrict the scope further:

  • Select the Restrict usage to members of the following role(s) option and select one or more roles from the drop-down list.
  • Select the Restrict usage to the following application(s) option and select one or more applications from the drop-down list.


Correlation tab: Define if a rule must execute for every match or only when the match occurs for a specified number of times in a chosen time duration.

By default, a rule is executed for every match. Select the Rule executes if matched a certain number of times in a specified duration option and type the Number of times and Duration (you can select the time unit: Seconds, Minutes or Hours, from the Duration drop-down list).

Change Log tab: Shows the change log for a rule.


Execution History tab: Lists the rule execution history.

Tags for this page: devops setting_up_devops dlm action_flow