Data in DCR Graphs

Data DCR Graphs

Data was introduced in DCR Forms in 2016. It has been possible to associate data with activities/events for a long time, but it has not been possible to specify data types or simulate graphs that contain data types, e.g. in order to make decisions.

A simple example of data in DCR graphs

Please look at this graph for a simple example of making a decision in a graph illustrated below:

DCR graph with data

Notice the event “Decision”. It is a data event illustrated by the box in the upper right corner of the event. The data type in selected in the Option panel under Advanced

Setting the data type

The Decision event has two values, 1 as “Yes” and 0 as “No” as illustrated below:

Setting the data type

When simulating an event with a data type cannot be executed directly as the user has to enter a value. Instead, the simulator will present the user for the value to be filled out using a DCR Form.

Data event in task list

Clicking “Open” will launch a DCR Form where the decision can be made.

Data event filled out in DCR Form

The log shows the value of data activities once executed.

Once data is filled out and form is submitted pressing Send button the guards on the include/exclude relations will use Decision=1 (Yes) to show the next step.

Tasks list after choosing Yes

Using guards in relations

Relations can be guarded, i.e. controlled by an expression. If the expression evaluates to true the relation is included in the calculation of semantics, whereas if the expression evautes to false it is the same as the relation does not exist.

The include and exclude relations below are both guarded by an expression, i.e. “Decision=1” and “Decision!=1”. If Decision=1 include is then only relevant relation as the guard “Decision!=1” evaluates to false and therefore is not relevant for the graph.

Using guards

We’re planning to define a new meta-relation called a logical include which will act as an include if it evaluates to true and as an exclude if it evaluates to false.

Read more about guards here where expression language is also defined.

Grouping data events into a DCR Form

Several data events can be grouped together and the grouping marked as a DCR Form

Setting Type to Form

Once events as grouped into the form object it will display green with the events inside.

Grouping events into a DCR Form

When the user click Open the following form is shown

Events grouped into a DCR Form

Computational events

Please refer to Computational events for details about how to make events computable.

Sidebar



Bitnami