How to Create Active Rules for Models, Visualizations and Views
Dragon1 supports the creation of (passive) Rules as entities.
Dragon1 also supports the creation of active Rules. Active rules are objects that can be used to filter and highlight entities and relationships in a model, visualization, or view.
Steps
Make sure you already have an atlas with a visualization in the Viewer that shows data of a model.
Steps to Create a Rule in the Repository:
- 1. Go to the collaboration tool: www.dragon1.com/collaboration
- 2. Select the Rules entity class in the data dashboard: www.dragon1.com/collaboration
- 3. Enter a name for the rule. For instance: Manual tasks are not allowed in a process
- 4. Enter an event for the rule. For instance: onclick
- 5. Enter a condition for the rule. For instance: task.execution = manual
- 6. Enter an action for the rule. For instance: shape.fill = red;
- 7. Click OK
This is how a rule looks like in a .dragon1 File:
Now you have created a rule.
Example of creating an active rule in the collaboration application.
Steps to Link a Rule to a Model:
A rule must be linked to a model before it can be used as an active rule.
Here, we do, in fact, two things: 1. we create a relationship between a rule and another entity. 2. we make the created relationship part of a model.
- 1. Go to the collaboration tool: www.dragon1.com/collaboration
- 2. Select the Rules entity class in the data dashboard: www.dragon1.com/collaboration
- 3. Select a Rule
- 4. Click Add Relationship
- 5. Select a model in the dialog.
- 6. Select an entity that is used in the model
- 7. Select an entity that is part of the model
- 8. Click on OK
Now you have linked a rule to a model.
Example of creating a relationship between an active rule and a domain and linking the relationship to a model.
Step to use a Rule on a Visualization
- 1. Go to Viewer
- 2. Select an atlas
- 3. Select a visualization in the atlas
- 4. Click the Reports button (in the bottom bar)
- 5. Click the Rules button in the dialog
- 6. Drag the list with rules to the left and collapse the built-in Dragon1 rules (if necessary)
- 7. Click on a rule in the list.
- 8. See the action being carried out if the rule's condition is met.
Examples of Rules
Below are examples of rules
Rule Description | Rule configuration |
---|---|
Spelling error | - event: onclick - condition: task.name includes [invoce,cretaed,entre,dtaa] - action: shape.fill = red |
Wrong ERP version is used | - event: onclick - condition: task.application <> SAPv3.11 - action: shape.fill = red |
List of Events
Possible rule events to choose from are:
- onclick
Structure of the Condition
The structure of the rule condition is
Possible operators are:
- =
- != or <> or equals or eq
- includes or contains or *=
- has
Structure of the Action
The structure of the rule action is
Possible attributes are:
- name
- fill
- stroke
- color
Get Support
If you want to configure a certain rule but have no clue how to do it, do not hesitate to email us at info@dragon1.com.