Document handling in workflows is an important topic. Uploading and downloading documents - possibly from a document management system - is at the core of administrative activities. Fortunately, YAWL has a built-in datatype called YDocumentType for doing exactly that. So let us follow the section on document type of the YAWL user manual to see how it works.
We start the YAWL engine, open the YAWL editor, and add two tasks.
We click on the first task and create a new decomposition called "Upload".
We create a data variable in our net called "document" of type "YDocumentType".
We now edit the data variables of task "Upload", pull the variable "document" from the net variables down to the decomposition variables. We should change the scope to "Output".
We proceed in a similar fashion with task download. The only difference being that the scope of the variable is now "Input".
That should be all. Save the file as document.yawl. We can now upload it to the running YAWL engine with the "Upload this specification to the YAWL engine"-button (7th from the left). When we start the workflow we get the following work item.
Pressing the up-arrow will give us a browse-upload dialog. After choosing a file we complete the activity and proceed to the download activity.
If you don't want to build the workflow yourself and just try the functionality the result of this tutorial is attached here.