Topic: wftk -- Process definition example -- open source project[ wftk home ] [ process definition ] [ discussion ] |
This is an attempt at the basic process outlined in the open source software
development scenario. Since it's the first scenario that involves workflow processes knowing about one another, there
are some new concepts.
<?xml version="1.0"?> <workflow name="Open source change request" author="Michael: michael@vivtek.com"> <role name="Analyst"></role> <role name="Developer"></role> <role name="Tester"></role> <role name="Documentor"></role> <data name="Change request number" type="sequence"></data> <data name="Description" type="text"></data> <data name="Supporting documentation"> <list><data type="document"></data></list> </data> <data name="Mailing list"><list><data></data></list></data> <!-- The mailing list starts out with just the requester's name on it --> <sequence> <task label="Analyze" role="Analyst"> <data name="action" type="choice(ok,merge,fork)"> <!-- Aha! Content of a data tag could be how to elicit it! --> </data> </task> <if expr="${action} == 'merge'"> <situation name="merge"></situation> <elseif expr="${action} == 'fork'"/> <situation name="fork"></situation> </if> <task label="Develop" role="Developer"> <data name="changes" type="collection(cvs)"></data> </task> <task label="Test" role="Tester"> <data name="test plan" type="collection(cvs)"></data> </task> <task label="Document" role="Documentor"> <data name="CR documentation" type="document"></data> <data name="Doc updates" type="collection(cvs)"></data> </task> </sequence> <handle situation="merge"> <task label="Define merge" role="Analyst"> <data name="mergee" type="workflow"></data> <data name="explanation" type="text"></data> </task> <alert type="foreign-role" to="${mergee}:Analyst"> <data name="label" type="text" value="Change request merge"></data> <data name="explanation"></data> <data name="mailing list"></data> </alert> </handle> <handle situation="fork"> <task label="Define fork" role="Analyst"> <data name="description" type="text"></data> <data name="newdescription" type="text"></data> <data name="Supporting documentation" type="collection(document)"></data> <data name="New supporting documentation" type="collection(document)"></data> </task> <start name="Open source change request"> <data name="description" value="${newdescription}"></data> <data name="Supporting documentation" value="${Supporting documentation}"></data> <data name="Mailing list" value="${Mailing list}"></data> </start> <resume/> </handle> </workflow>Hoo boy. Lots of new stuff in this one. Let's run down the list.
All those new data types
So I'm getting a little more creative with data types. I tossed in an "enum(<>)" just to
see how it looked. I'm not overly enamored of enum data types, but it does give it a clean
appearance.
<resume> tag, anyone?
Workflow merge
So instead I decided to see if it makes sense to handle this as a notification to a role in the other
process, which I called a "foreign-role" type of alert. The recipient of this alert would have access
to the necessary data in the current workflow (even after it's no longer active) to merge the information
into the foreign workflow.
This would seem to create a sort of ad-hoc task in the foreign workflow, so we might want to think about
treating it as a sort of task. The whole ad-hoc task question is wide open anyway.
Workflow start
Task specification with two collections
Well, that's all I can think of at the moment. I'm sure this one will spark just as much
debate as earlier installments in the XML series.
|