You can also access this tutorial in German and French.

 

In this tutorial we continue working on our specification with the YAWL Editor. We enter the data that the participants will work with during process execution.

You can find the supplementary material here.

Hello, welcome back to the YAWL tutorials! You remember that we had three perspectives in workflows: namely the control flow, the data, and the resources. In the last video, we talked about editing the control flow and we did that with the YAWL editor and in this video, we'll talk about data - entering information about data - for every task in our control flow. And the next video will then be on the resources. So let's start where we left off in the last tutorial. If you don't have the specification of the last tutorial, you can go back to that tutorial and find it in the supplementary material. You will find a .yawl file in there that you can then load if you want to start from there. I have already opened up the YAWL editor now. Remember that you need a running YAWL engine and the resource service and that the YAWL editor must be connected to it. So let's go and look at the specification we did the last time. So we had four tasks here: one is "Submit leave request", then "Approve leave request", "Note approval", and "Note rejection". So we'll start off by telling the editor, what are the data we are going to use with "Submit leave request"?

So for that, we click on this task symbol here and then on the left hand side you can see that the editor has opened several sub panels here from the properties of the specification to the net, the task, and - last but not least - the decomposition. And this is a some kind of hierarchy. So in order to enter the data necessary for this task, what we can do is, we can directly go to the decomposition now and we find one line here about data variables. So if we click on that, there's a window opening now and we can enter net variables in the upper half and decomposition variables in the lower half. We can think of the net variables of being global variables in this net and decomposition variables being local to the decomposition we are currently editing; and the decomposition we are editing is called "Submit leave request". So it belongs to that task. So what kind of data do we need here? Let's say, we want to have the first name and the last name of the applicant. So we go here on the plus sign and we say the name of the variable. So I will call it "First_name" and you cannot see it here, but note that I did an underscore here, because these are XML elements and we will cover in a later video how you can edit variables containing blanks, variable names or labels containing blanks. But for the time being, let's just use underscore here. So First_name is the name of the variable and then the second column here is the type. So string is the default type and that's fine for this variable. We have a name and then the scope is local within this net. That's fine as well. The next variable we need is the last name, so I type in "Last_name" and we want to have a start and an end date. So I will add another variable "Start_date" and this time, I will choose the data type date. So I type in a "d" here and then I choose this date type and the same for end date.

And the last variable here is the destination. Oh, let's put in another one for the reason. So these are the variables we will use in this specification and we will use it in this decomposition. So in order to use them in the decomposition, we have to define something that is called a mapping of the variables from the net to the decomposition and this can be done manually but for the time being we will do that completely automatically by the editor. So what we do is just, we select the first variable and then we drag it into the decomposition and then we do this with all the other variables. So "Last_name", "Start_date", "End_date", "Destination", and "Reason".

So now we have to think about the scope of the variables in the decomposition and in the net these variables were local variables but in the decomposition we have three different choices for variable scopes. One is input/output. This is the default selection meaning that the variable has already a value in the net. We read its value, we edit it in the net and then we output it back to another net variable. The second scope is input only. Input only means that it has already a value in the net, it is input into the decomposition and then it is read only. We cannot change its value. And then we have the third option is output. So this means, we don't have a value yet and we are just going to create a value here in the decomposition and then this will be output to the net. And it is this third option we will use here for our first task because all of the variables are uninitialized for the moment. So I will choose output here and I'll do the same for all the other variables.

And then I can click "apply" and "okay". So we are done for the first task and the second task "Approve leave". So we are going to imagine that now someone maybe the superior of the applicant is now approving or rejecting the application for leave and we need all of the variables that we have seen in the last task as input variables now. So let's do that! So we open again the data for this decomposition and then we just drag and drop all of the variables here: "First_name", "Last_name", "Start_date", "End_date", "Destination", and "Reason" and we give all these variables the scope input. Now we will have to add two more variables: one is the variable that is about approving or rejecting this application and we will call this one "Approve_leave". So we will add another net variable here first, call it "Approve_leave" and this time this is a boolean variable. And the last variable is the rejection reason and this is a string and again we have to pull these variables down here and the scope now because it's the first time they are being used in this specification is output.

So very well! The next thing we will do is, we will edit this task "Note approval". So in case it is approved - and we will come back to this XOR branching here later - when it is approved, we want to see everything that has been entered in the "Submit leave request" including the approval check mark. So again, it's the same thing. We just open the data variables dialog and we just enter "First_name", "Last_name", "Start_date", "End_date", "Destination", "Reason", and "Approve_leave". And, because it's just a notification, we are going to set the input scope for all of these variables.

And "Note rejection" is very similar we just enter all of the variables we have here. And we will also enter the rejection reason and they are all of scope input. So now we have entered all of the data. The only thing that's missing now is that we need something to tell the system here for this XOR split which way to go. And which way to go is really dependent on what is the value of the variable "Approve_leave". We have "Approve leave request" selected and we go to "split predicates".

And now the system shows us "Note_approval" and "Note_rejection". And currently "Note_approval" is selected. And you can see the arrow that goes there is green and if we select the second option the arrow is green there. So what condition do we need for "Note approval"? Well, true means it's always true so that's not correct. So we want to edit that and we click the three dots here and now we have the possibility to generate an expression of a variable and we are lucky because "Approved_leave" is already selected here. So what we do is, we just press these two circles here and then we get an expression that gives us the value of the variable "Approve_leave". We will cover the subject of these expressions in a later video. For the time being, all we do now is we check if the value of this "Approve_leave" variable is true and we put true inside hyphens and then we can see the expression is syntactically correct and we press ok.

So that's all that we need now and we just have to check if our specification is valid. So we validate it here: "no problems reported" and then we save it here and it's done. So now we have entered the data for our little specification and in the next video I'll show you how to enter the resources that are going to work with this. See you then!