Example Workflow - Copied from Kuali Project
Example workflow
Here's an example of a workflow:
Imagine you had a simple workflow defined as this....
Process: Creating a new Course
It has steps of:
"Fill out Course Proposal Form":
- That can be done by any person with the role of Course "Submitter"
- It has only one output state which is "Submitted"
"Validate Course Proposal":
- That can be done by people in different Schools with the "Validate Course Proposal" role
- This has two possible output states (validated, invalid) – If invalid it is sent back to the submitter for correction or addition
"Approve Course":
- This can be done by people in different Schools with the "Approve Course" role
- This has 2 possible output states Approved or Rejected – If rejected the submitter is notified and the workflow ends (maybe the data collected is removed or saved to archive)
"Activate Course":
- This might be an automated step that sets the course to an activated status and ends this particular workflow.
Now imagine the interaction between the participants and the workflow engine.
Let's assume the workflow engine has the above process defined.
The first step would be taken by the Submitter Application.
It would put up a form and collect the basic information. It would then persist this using the LUM Service createClu() getting an CluId back. It would then call the workflow Services createWork call with "create New Course" Process, and the CluId (workId?) and OrgId(QualifierId) as parameters. It might call the WF service and declare the first step done.
Joe was the submitter of this proposal for a new course in the School of Science.
Next the workflow service would log the fact that the step had been done with the time and who did it, and what the output state was. This work history would continue to built up after each step.
Using the process definition the WF engine would add this work to the queue of "Validate Course Proposal" in the School of Science.
Sally is one of the people in the School of Science that has the role of "Validate Course Proposal"
When she logs in to the portal she see's that there is new work in her work queue.
It is a New Course Proposal from Joe that needs to be validated.
Using the WorkId the application goes to the LUM service and pulls up the current description. She makes changes or comments and saves them saying that this was validated. The application makes a call to the WF service to register that this step was done.
Again the Workflow service registers the state of the work and makes it available to the new work queue of "Course Approver" for the School of Science.
and the process continues......