Process fragments

Process fragments – beta March 2020

Sometimes graphs can be large and you wish to split them into smaller graphs to make each piece easier to manage. You might also wish to create a library of fragments that can be reused in other processes, e.g. an approval fragment or a decision form in an application process.

We’ve created a simple example of an application process which is outlined below. The applicant fills out a form. Once done the case worker reviews the applications. If the application is a specific type, applicationtype=1, then an extra step must be done before board can make a decision.

If case worker approves review a board member review process starts that can lead in pay out if board member also approves the process.

Round approval is done by a System role as this is a global activity happening in another graph. Once round is approved pay out can be done, provided board member has approved the application, and the applicant can be informed about the decision.

Notice that ApplicationType is used as a guard. If ApplicationType is 1, then an extra step must be done in the review phase by the case worker.

Process fragment, interface events, forms - complex process

We’ve made the graph public and encourage you to make a copy of the graph and experiment yourself.

Process fragments is now in beta so you can experiment with using it. We reserve the rights to change semantics so we encourage you not to use it in production yet. We expect to make the final version in April or May 2020.

Externalizing part of the graph as a fragment

We can externalize the form by clicking on the form and in the Options–>Advanced tab click the Externalize button as outlined below.

Options Externalize

When you click Externalize button the following steps happens:

  1. The subprocess, here the DCR Form, is created as a separate graph
  2. The subprocess is removed from the parent graph and instead a reference to the newly created fragment is inserted
  3. Finally, interface activities are mapped from the outer graph to inner form and from inner form to outer graph

The subprocess, the DCR Form, is simply a graph containing the activities of the main graph, and is outlined below:

DCR Form - Process fragment, interface events, forms - complex process

We notice that the form contains the exact same activities as found in the parent graph above.

In the parent graph we replace the inline DCR Form with a reference to the fragment:

Parent - Process fragment, interface events, forms - complex process

Notice the link icon in the lower left corner of the form. This indicates that this is a linked fragment, and if we click on the form and check in Options–>Advanced we can see the link to the fragment containing the form.

Options Fragment

The activity ApplicationType is part of the parent graph. The reason is that ApplicationType is used as a guard in the parent graph and therefore can be charactarized as an interface activity from inner.

Activity Interface Event From Inner

Two types of interface activities exists:

  1. From Inner – this means that this activity is needed from the inner graph
  2. From Outer – this means that this activity is needed in the inner graph from the outer graph

We can inspect the interface activities from the specific fragment by clicking on Grouping Type menu to the right of Form in the Options–>Advanced panel:

Grouping Type Form

When we will see mapping of interface activities from outer graph to inner and from inner graph to outer.

Map Interface Activities

Here we only have an interface activity from inner. This means that the ApplicationType in the parent graph must be linked with an activity in the inner graph, the DCR Form. When externalizing a DCR Form the mapping will be filled out automatically and the activity id will be identical.

Interface activities from outer

Interface activities from outer exists if the inner graph either refer to outer activities in guards or relations cross the boundary between the outer and the inner graph.

Interface activities from outer is not really part of the subprocess and thus cannot be executed within the subprocess. The only reason it is included in the subprocess is that the marking of the activity is needed within the subprocess.

So interface activities from outer are not visible if a DCR Form and similar will not be shown in tasks lists.

Simulation with process fragments

When you simulate graphs that contains fragments we splice these fragments into the main graph when the simulation starts.

Fragment simulation

Future plans

We will extend process fragments so it is possible to replace and edit the link to the process fragment.

You can already create libraries of fragments. We will recommend that you place fragments in a category that can be shared among several users.

We will also make it possible to simulate graphs with process fragments without including the process fragment in the simulation. This makes simulation simpler as we only need to simulate the part that affects the process.