You can also access this tutorial in German and French.

Vous pouvez trouver le matériel supplémentaire

In this video we explore composite tasks in YAWL. Composite tasks allow for the creation of sub workflows and are a means of structuring more complex business processes. YAWL sub workflows are built upon the principle of Single Entry Single Exit (SESE). The file below contains a YAWL specification to start with and the result at the end.

You can find the supplementary material here.

Welcome back to another YAWL tutorial! Today we are going to talk about sub workflows also called composite tasks in YAWL. Sub workflows are needed when workflows become more and more complex to factor out certain parts of them. In YAWL we have the principle of single entry single exit, that is each sub workflow has exactly one entry point from the control flow perspective and one exit point. What is special about sub workflows or subnets is that, if you are accustomed to ordinary programming languages you know the concept of scopes that you have certain blocks and that variables are visible in lower blocks from upper blocks. In YAWL, we don't have that concept. Instead if you have a subnet, you need to explicitly pass the parameters to it and we will see that. So if you look at the supplementary material - the link below - you can upload an initial net and in this tutorial we will work on this net and bring it to a final version. Okay, let's go! So we start with a YAWL specification from the supplementary material. You can find it down here and this file is called Tutorial10.yawl. So load that into your editor and then let's start. So we have already a first task in here and we have some data types and some variables prepared. So suppose we have an ordering process where the first task is "Prepare purchase request". We then want to continue ordering and ordering is a two-step sub process. So in order to do that in YAWL, we go to the pallet here and choose the two squares here and click on a canvas somewhere and then we can connect this as any other task. And for the time being, we just connect it to the end. And now, if we go to this so called composite task, we can now create a new subnet. And the subnets name is "Order" and if we go into this new tab now. Here we have a new sub YAWL specification with a single entry and a single exit. Just as an ordinary YAWL specification. So here in this subnet, we have two tasks:

The first one is called "Approve purchase" and the second one is called "Prepare purchase order". So we go down here, create a new decomposition and the second one is "Prepare purchase order". And now we go back to the main net. We need to explicitly pass net variables down to the sub net and - in this case - we need two net variables. We go to this order composite task, click on data variables and then we say, we need the purchase request and we need the purchase order. And the purchase request is an input variable that comes from the top-level net and the purchase order is an output variable. So now we have the variables available and if we go down to the order subnet and to the task "Approve purchase", we can now drag and drop the purchase request from here and if we need another variable - let's say a boolean variable "Approved" - we can define it as a local variable here and just drag it into that task and then prepare purchase order. So variables here are the "Purchase_request" as an input variable, the "Approved" as an input variable, and the "Purchase_order" as an output variable. And this will prepare the output for the whole subnet. So that's all for now! We will continue with this example in a later video. You can find the final net of this tutorial in the supplementary material.

The next tutorial will be the first one on more advanced topics, namely the multiple instance task. Hope to see you then!

Supplement_0.zip (4.35 KB)