You can also access this tutorial in German and French.

 

This tutorial is the answer to a special request: namely to talk about thresholds and dynamic instance creation in multiple instance tasks in YAWL. We configure these parameters in a specification and show their effect in running a case. The zip file below contains the YAWL specification before and after the configuration.

 

Welcome to this tutorial on multiple instance tasks! Tutorial 11 was the first one about the basics and Martin asked for dealing with more advanced topics like thresholds and dynamic instance creation. So we will do that in this tutorial. We will start with a specification from tutorial 11 where a number of candidates are interviewed. You can find the specification in the supplementary material below. So in our scenario today, we will start with three candidates initially and we start interviewing the first one. And while we are doing that, there is another candidate that comes up and we want to add this candidate dynamically. But we have also set a threshold to three. That is when we have reached three interviews we will stop the interviewing and for that we will need thresholds and dynamic instance creation. So let's go to the computer! So now we have our editor open with a specification from the supplementary material and we will select the multiple instance task "Interview candidates" and on the left hand side you can see the multiple instance attributes here.

So we will edit those. We have the minimum exactly one. We leave that. The maximum, we put it to no limit and the threshold, we put it to three. And then we allow dynamic instance creation. Okay, and with these settings, we will execute the workflow now. So here we are in the control center with the user that is administrator and ordinary user at the same time. We go to the cases and we select tutorial 11 here and launch a new case: case id 10. And then we edit the candidate list and we can directly start the work item for our user.

And the first work item is "Edit candidate list". So we will fill in three people. These are the initial candidates we have on our list. Complete that. Now we have "Interview candidates". The first work item is started here and the others will appear as soon as we start this one. Sorry, it's not started it is unoffered now. So we will start this work item and then we can see that two new work items appear here and the one is worklisted. So we start the other ones as well.

And then we have three work items in our list. And let's say we start the interview with the third candidate. And we can say this is a good candidate. And now we have a fourth candidate coming up that is not on our list yet. So this is dynamic instance creation. So we have a button here: new instance. And we fill in an empty XML here in order to start this. And now suppose we do the interview with this new candidate. So this is the fourth one. And now we have two interviews left and we do one more.

Now we have three interviews and remember: the threshold was three. So what we have now is, we have check candidate list. And we have the results here. So the fourth interview is not necessary anymore and we're done. Dynamic instance creation is perhaps one of the rarer patterns. You may have noted that creating a dynamic instance by entering XML is nothing that we would like the end user to do. And then thresholds are a little like cancellation regions in YAWL. I hope that Martin's questions is answered now. See you next time!