YAWL

YAWL is a graphical notation for expressing workflows, similar to Workflow Nets based on Petri Nets, but with more expressive syntax.


It is possible to express the following constructions:

  • choices
  • timeouts
  • etc

Basic Syntax

Syntax in YAWL looks similar to Petri Nets

  • but there is syntactic sugar that makes it easier and more expressive
  • and there also is some relaxation of the rules

yawl-and-xor.png

AND

AND-split:

  • yawl-and-split.png

AND-join

  • yawl-and-join.png
  • note that the semantics of the AND-join in YAWL is the same:
  • both places need to have tokens for $d$ to fire

yawl-and.png


XOR

XOR-split

  • yawl-xor-split.png
  • need to put some code to the XOR-split node: so it will decide which way to follow
  • (don't confuse with Deferred Choice)

XOR-join

  • yawl-xor-join.png
  • semantics is the same: $d$ can fire if there's a token in either place

yawl-xor.png


Loops

While-loop

  • yawl-while-loop.png
  • based on the condition in the XOR-split it either continues or stops
  • it was not possible to express that in Workflow Nets


Repeat-loop

  • yawl-repeat-loop.png
  • until the condition in the XOR-split is not satisfied, $B$ will not be enabled


Start and Stop

There's also a special notation for start and stop places

  • yawl-start-stop.png


Transitions

Transitions in YAWL can be connected directly, without a place within them

  • but there still is an implicit invisible place between such transactions
  • yawl-transitions.png
  • if there's a place between transitions, it means that one is done, but the other has not started


Transitions in YAWL are no longer atomic

  • in YAWL now you cannot assume that they fire immediately: they may need some time to do the task
  • yawl-transitions-2.png
  • so in essence, one transition in YAWL correspond to two transitions in a Petri Net and one place between them


Exercise

yawl-ex-seq.png

  • what are the valid firing sequences? what activities can be performed in parallel?
  • first, let's explicitly show the invisible places and name all the places
  • yawl-ex-seq2.png
  • now we can build some kind of a Reachability Graph (here we don't consider places inside the transactions)
  • but in this case, unlike in Petri Nets, firing one transition can lead to several states
  • yawl-ex-seq2-rg.png
  • in this example firing $B$ may bring to 3 different states, depending on what arch it will take
  • we see that this network in not sound:
    • it has no option to complete in several cases
    • it has improper termination
  • the highlighted edges lead to the final state
    • thus the valid firing sequences are:
    • $ABCD$
    • $ABCEFG$
    • $ABCFEG$
    • $ABCFEG$
    • $ABCCEFG$
    • $ABCCFEG$
    • note that, for instance, $ABCCEFG$ may correspond to two different paths in the reachability graph
  • based on that it's clear that $E$ and $F$ can run in parallel


Advanced Syntax

Cancellation Regions

Main Article: Cancellation Regions


OR-Split and OR-Join

OR-Split

OR-split is similar to XOR-split

  • but instead of taking one route, it can take many

Example

  • suppose we're buying a flight ticket and offered 2 additional options: hotel and car
  • yawl-or-split.png
  • the branches to active depend on what exactly you have selected
  • and the OR-split should be programmed to route in the needed directions
  • the system can fire many tokens, but there's one restriction: there must be at least one token

Note that

  • OR-split is just syntactic sugar
  • it can be expressed with AND-splits and XOR-splits
  • yawl-or-split-with-and-xor.png


OR-Join

OR-Join is used to synchronize many incoming branches

It has the "bus driver" semantics

  • OR-Join is activated only when all tokens are ready to be consumed
  • a bus driver will wait for people to jump in when he sees that people are still coming


We should handle OR-joins

  • this semantics can be computationally quite expensive
  • some decision properties may suddenly become unavailable
  • if complicates the model


Example

  • yawl-or-join.png
  • if there are still tokens to arrive, the OR-join will wait for them
  • once everybody is ready - it fires

Consider the following net:

  • yawl-or-join-dilemma.png
  • in this example none of the OR-joins can fire
  • there hypothetically can be more tokens to arrive
  • so they are waiting
  • no Option to Complete


Examples

yawl-or-join-ex.png

  • case (a):
    • $C$ is enabled: it's a XOR join
    • and $D$ is enabled: it's not possible to get a token from another branch
  • case (b):
    • $C$ is working, but it can be started again: it's enabled since there's another token
    • $D$ is not enabled: it will be only when $C$ finishes its work
  • case (c):
    • $A$ is already running
    • $C$ is enabled (here it's the same situation as in the case (a))
    • but $D$ is not enabled: there's in a token inside $A$, which may arrive from the branch below
  • case (d):
    • $C$ enabled
    • but $D$ is not enabled: there's a token before $C$ that may arrive


Sub-Nets

To increase readability it's possible to fold some activities to one

  • this concept is called a sub-net
  • yawl-subnets.png
  • a subnet must also be a valid net - with its own start and stop places


Data

It is possible to store some variables in the YAWL engine

  • to keep the results of execution, etc

Data can be stored at different levels (i.e. scopes)

  • process level - global
  • case level - related to this particular case
    • i.e. data for each case is different
  • task level - most local

We don't need to transfer data from activity to activity

  • there's a single data storage that will keep it
  • yawl-datastorage.png


Timers

TODO


Resource Perspective

TODO


YAWL Option to Complete

YAWL's option to complete is different from the option to complete property of Workflow Nets

YAWL-OTC:

  • for every reachable marking $M$ we can reach the final marking $[o]$
  • so this is a combination of Option to Complete and Proper Termination
  • unfortunately YAWL-OTC is not always decidable, therefore it's sometimes still better to use the definition of the Option to (improperly) Complete


Examples

Housing Agency Net


Example 2: Travel Agency

To organize a trip

  • the customer request is registered
  • then an employee looks for opportunities
  • the customer is contacted to find out whether he is still

interested and whether more alternatives are desired

  • if the customer selects a trip, then the trip is booked.
  • in parallel (optionally) one or two types of insurance are prepared
  • two weeks before the start date the documents are sent to the customer
  • it is possible that the customer cancels the trip at any time before the start date

yawl-travel-agency.png

It is also possible to use OR-join for choosing the insurances:

  • yawl-travel-agency-orjoin.png


Example 3: Homework Submission

An exercise for modeling from the resource perspective:

  • yawl-assignment-submission.png


Example 4: Four Dining Philosophers

The same net as in Petri Nets:

  • yawl-dining-philosophers.png


Links

Sources