The ability to represent control flow structures in workflow nets is investigated.
As with any other process modelling language, the sequence pattern can easily be expressed in workflow nets. In Figure 4.42, the sequential execution ofA and B is realized by a place p and the associated arcs. As indicated above, the execution of a business process activity is represented by the firing of a transition.
The firing rule of Petri nets makes sure that A puts a token on p only after its termination. Hence, B is enabled only after there is a token in p.
Since only enabled transitions can fire, we have the following sequence of events: A fires and puts a token in p enabling B, which can now start its
Fig. 4.41.Sample workflow net
execution. Therefore, by transitivity of the ordering relation,Bcan only start after Ahas terminated.
Observe that colouring information is not regarded when discussing control flow in workflow nets. For the sequence pattern, the colouring of the tokens can be disregarded. However, if transitions need to make decisions when they fire, the colouring of the tokens needs to be taken into account; this will be discussed in more detail below.
Fig. 4.42. Sequence pattern in workflow net
And split and and join control flow constructs can also be expressed in workflow nets conveniently. Again, standard Petri net firing behaviour suffices.
Figure 4.43shows a workflow net in which there is a transitionA that puts tokens in its output places p1 and p2, enabling B and C, respectively. As a result, transition A realizes anand split. After B andC have terminated, there are tokens in p3 andp4, enabling theand join transitionD.
Theexclusive or splitandexclusive or joinpatterns can also be expressed in standard Petri nets. As shown in Figure 4.44, anexclusive or split can be realized by a place with multiple outgoing edges leading to multiple transi- tions. These transitions are enabled at the same time. This type of exclusive or split is called implicit exclusive split, because its behaviour depends on the behaviour of the transitions involved, in this case, AandB.
Although both transitions are enabled—in the example, A and B—only one transition can fire, withdrawing the token from p1 and adding a token
Fig. 4.43.And split andand join patterns in workflow nets
to p2. Theexclusive or join is realized by a place that receives a token from either AorB.
Fig. 4.44.Implicit exclusive or split also known asdeferred choice
In the scenario shown in Figure 4.44, the transitions involved decide by their firing behaviour about the branch of the workflow net that the process instance takes. Since the decision is deferred to the latest point in time, this pattern is also calleddeferred choice.
There is a second type ofexclusive or split in workflow nets, in which the decision on which path to take is made explicitly by a transition. This feature takes advantage of coloured Petri nets, in which transitions can implement decision rules, which are evaluated at run time to decide which of its output places to put tokens on.
This also means that the behaviour of classical Petri nets is no longer valid for workflow nets. As a consequence, as in coloured Petri nets, the graphical representation of the workflow net does not fully specify the behaviour of the process instance controlled by the workflow net.
The workflow net shown in Figure4.45illustrates these observations. Tran- sitionAimplements a decision rule by associating conditions with each of its outgoing edges. Anexclusive or semantics of this decision can be realized in different ways (workflow nets do not prescribe any of them).
The first way to realize an exclusive or semantics is to make sure that the conditions are chosen in a way that always one and only one condition evaluates to true. The second way is to evaluate conditions of outgoing edges
in order. As soon as one condition evaluates to true, the respective edge is chosen, and the token is put on the respective place.
The problem with this strategy is that there might be situations in which no condition evaluates to true. If no additional measures are taken, then the case gets stuck at this point. This problem can be tackled by defining a de- fault branch which is taken if none of the (expressions of the) other branches evaluates to true.
Fig. 4.45.Decision rule based split, can realizeor split,exclusive or split, andand split
To express the particular split and join behaviour of transitions in work- flow nets, the transitions are labelled with specific symbols. This labelling of transitions is called syntactic sugaring; it is shown in Figure4.46.
It is the responsibility of the modeller of the workflow net to make sure that the decisions associated with the transitions match their symbols. The and split and and join markers indicate that the traditional Petri net firing behaviour of transitions is in place. If a transition is marked with an and split symbol, the reader of the workflow net knows that the transition puts a token on all its output places, while thexor split marker models an exclusive decision when the transition fires.
Workflow nets represent business processes, focusing on activities and their execution constraints. To enhance the representation of business processes and to provide a means to represent in more detail the environment in which these processes are enacted, triggers have been introduced. In the context of workflow nets, triggers are annotations to transitions that provide information on who or what is responsible for an enabled transition to fire.
Situations in real-world business processes that can be represented by trig- gers are the receipt of an electronic message or a time-out of a timer to remind an employee of an upcoming deadline. Generally, a business process manage- ment system is a reactive system. It reacts to events in its environment by
Fig. 4.46.Syntactic sugaring of transitions in workflow nets
enabling an activity. Triggers play an important role in informing the system about events in the process environment that are relevant for the process.
Figure4.47shows the types of triggers used in workflow nets. Transitions that can fire immediately after they have been enabled are not marked with a trigger; triggering is thereforeautomatic. For example, automatic triggers are used for transitions that are realized by invoking a software system, where no user interaction is required.
A user trigger is attached to transitions that require human interaction.
By marking a transition with a user trigger, the process modeller expresses the fact that a human user takes the initiative to start the activity represented by the transition. This trigger is relevant in human interaction workflows, where work items are used to communicate with human users.
A work item list of a particular user contains items, each of which rep- resents an activity (more precisely, an activity instance) that is enabled and that can be executed by that user. Whenever a transition with a user trigger enters the enabled state, a work item representing this activity is sent to the work item lists of the users who can perform it. Role information is used to determine the knowledge workers. When a user selects a particular work item, the activity is started and the work items reflecting it can be deleted from the work item list.
Modelling organizational aspects like users or roles is not supported by workflow nets. A transition marked with a user trigger indicates that the activity represented by that transition requires a human to start it. Organi- zational aspects need to be covered by tools that employ workflow nets for process modelling and other techniques for modelling organizations. The same applies for representing data, which is also not covered by workflow nets.
An external trigger is the main instrument for reacting to external events like an incoming message. When the transition that carries an external trigger
Fig. 4.47.Triggers in workflow nets
enters the enabled state, it listens for this event. When the event occurs, for instance, when an order arrives, the transition fires and the activity starts execution.
Time triggers are used to specify situations where the start of an activity depends on temporal aspects. Time triggers can be assigned a time-out value.
The timer is started when the transition enters the enabled state. When the timer runs out, the enabled transition fires. If the transition is no longer enabled, the timer is stopped.
Figure4.48shows a workflow net with a typical usage of triggers. In this process, a request is sent, represented by the Send Request transition. The workflow net implements an implicit exclusive or split that concurrently en- ables (transitions that represent) activities to collect the response to the re- quest and to send a reminder.
The Collect Response activity is marked by an external trigger, so that it is started once the response comes in. A reminder should be sent if after a defined time interval, for instance, 14 days, no response is received. This business logic can be implemented in a workflow net by attaching a timer trigger to the Send Reminder transition.
The timer is started when the transition enters the enabled state, that is, after the request is sent. If the response is received within the timer interval, then the Collect Response transition fires. In this case, the Send Reminder transition is no longer enabled, so that the timer can be stopped.
Triggers can also illustrate very well the difference between an explicit exclusive or split and an implicit exclusive or split, as shown in Figure 4.49.
In anexplicit exclusive or split (a), the decision on which branch to activate is made by a decision transition, so that either transition A or transition B is enabled. In this setting, the desired functionality is not realized, because if
Fig. 4.48. Sample workflow net with external trigger and time trigger
A is enabled, the timer will not be started, and ifB is activated, there is no way for the user to start working on activity A.
The desired functionality is provided if both transitions are enabled con- currently, as shown in part (b) of Figure 4.49. The timer is started, and the user trigger is available. If the user starts the activity on time, that is, be- fore the timer expires, then the timer is stopped. If the user fails to start the activity on time, activityB is started to cater to this situation.
Fig. 4.49. Sample workflow nets illustrate the difference betweenexplicit xor split (a) andimplicit xor split(b)
Trigger activities can formally be represented by places with an arc to the respective transition. For instance, a user trigger of a transition A is repre- sented by a place psuch thatp∈P and (p, A)∈F, as shown in Figure4.50.
The behaviour of the user is represented as follows. If and when the user se- lects this activity, a token is put in placep, enabling transitionA. In this case, A can fire, representing the execution of that activity.
While the behaviour of the user trigger is specified well using the additional place and the additional arc, there is an issue to cope with: the Petri net resulting from expanding the user trigger by a place and an arc is no longer a Workflow net! This is due to the fact that pis not on a path from the initial place i to the final place o. In the context of business processes involving
Fig. 4.50.Representation of triggers
multiple parties, however, these trigger places are very useful to interconnect the processes involved.
While workflow nets have been primarily developed to represent business processes within organizations, workflow nets can also be used for processes spanning multiple organizions, as shown in Figure 4.51. The diagram shows a business process involving a customer and a bookstore, and it contains activities for the ordering of books by the customer and the processing of the order by the bookstore.
All activities in this scenario are represented by transitions of one workflow net. In order to satisfy the structural properties of workflow nets, the process starts in the initial placeiat the customer, and it ends in the final placeoat the customer. Later, in the context of business process choreographies, more elaborate techniques will be introduced that separate an externally observable behaviour of a business process from its internal realization. However, in the current example, the workflow spans multiple parties.
The process starts with the customer browsing the online catalogue of a bookstore and selecting books. If books are found, an order is assembled and sent, represented by the send order transition. This transition spawns off two concurrent threads, as shown by the and split symbol.
In one thread, the message is sent to the bookstore. The sending of the order is represented by a token in the input place of the receive order tran- sition. When the order is received in the bookstore, the order is processed.
If the order is okay, the books are sent; otherwise, a message is sent to the customer that informs him that not all books are available.
This means that the bookstore sends one of two possible messages for each case. On the customer side, this situation is handled by an implicit exclusive or split. In this split, two transitions can be enabled at the same time. If the bookstore sends the books, the receive books transition of the customer is enabled and will fire.
Fig. 4.51.Sample workflow net involving multiple parties
If, on the other hand, the message is sent, the respective transition on the customer side is enabled. Observe that the alternative branches in the bookstore need to be joined, and the join transition is connected to the cus- tomer side. This is required in workflow nets, because otherwise there would be places in the workflow net (send books andsend not available) that are not on a path from the initial place to the final place.