Document Approval Chain Example
Use Case
The ABC
Corporation regularly receives RFQs (Request for Quotation) for
custom work from prospective clients. A sales person is assigned to
analyse the client's requirements and prepare a quotation document:
before the tender document is submitted it requires a chain of
approvals at various levels within the company. The following groups
or persons are required to approve the document, in order:
- Peer reviewers
- The
Vice President of Sales
- The
Director of Communications
- The
Chief Executive Officer
Each approver can either reject or approve the document, citing a
reason. They each have three working days in which to approve the
document – if they have not done so by then, the workflow system
automatically routes the document to the next approver. If the
document is rejected, the workflow system re-routes it to the
previous person in the chain.
Whenever such a Proposal Document is created, the electronic document
management system automatically initiates a workflow process, passing
the HTTP URL of the new document and the user ID of the creator. The
participants of the document approval process use the corporate
standard office software to view and edit the document via WEBDAV.
The workflow management system has been configured with a tool agent
to launch the office software. The web browser is used to record the
reviewer's decision.
Interfaces
Applications
- Approval
Form: updateProcessAttributes(INOUT
STRING attr)
- Web
browser: browser(IN
STRING url)
- Document
launcher: obe.viewDocument(IN
STRING docUri), obe.editDocument(IN
STRING docUri)
Hints
- The uploading of a new document to WebDAV should trigger a new instance
of this workflow.
- Model
the peer review stage by assigning the activity to a group of
individuals named
Sales
. This will create a work item
(an
assigned activity instance) for each member of the group. Assume
the peer review activity will automatically complete once all the
work items are complete (or the activity times out or is manually
marked complete).
- The
obe.viewDocument
and obe.editDocument
tool agents rely upon the browser's content handler plugins or
host operating system's built-in shell
file associations to launch the appropriate application for the
document type in question.
- Capture
each participant's approval or otherwise using the
obe.updateProcessAttributes
application.
- Use
a synchronous
<xpdl:Deadline>
to implement the
three-day timeout periods.
- Check
out OBE's pluggable work item
assignment strategy, activity
completion strategy, and business calendar
facilities.
Questions
- What
happens if the timeout period spans a weekend or holiday?
Solution
Process Model Description
- The workflow is triggered by the
DocumentCreated
event
(defined in
$OBE_HOME/examples/config/BasicApplicationEvent.xml
). Notice the
<xpdl:ExtendedAttribute name="obe.Event">
element attached to the <WorkflowProcess>
below:
see how it fetches the docUri
process attribute from the
event by specifying it as an OUT parameter.
- Alternatively the workflow can be explicitly instantiated using
the Web Worklist, in which case it will be necessary to supply the
docUri
process attribute value (necessary, because it is
specified as a <FormalParameter>
of the workflow).
-
The
workflow consists of an initial Edit Document activity
(edit-doc: auto-start, manual-finish) which uses the web browser to
download the document and launch an appropriate application to edit
it.
- Once the document is complete the submittor marks his or her
work item complete, thereby initiating the sequence of four
consecutive review steps (peer-rev, vp-sales-rev, dc-rev, ceo-rev:
auto-start, manual-finish).
- In each step the reviewer executes the
work item; this launches two application-type tools: one window
displays the document and another captures their accept/reject
decision and review comments.
- Acceptance moves the process forward
to the next step; rejection reverts it to the previous step.
- If a
review work item has not been completed within three days a timeout
exception closes the work item and moves the process forward via (~
timeout) activities (a6, a7,
a8: auto-start, auto-finish), which invoke the OBE procedure
obe.assignProcessInstanceAttribute to record the string '(timed out)'
in the appropriate comments variable. The Chief
Executive's review activity is not subject to timeout; when it is
complete, the workflow completes.
XPDL Process Model
<?xml version="1.0" encoding="UTF-8"?>
<Package Id="document-approval" Name="Document Approval" xmlns="http://www.wfmc.org/2002/XPDL1.0" xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd">
<PackageHeader>
<XPDLVersion>1.0</XPDLVersion>
<Vendor>Open Business Engine</Vendor>
<Created>2004-08-08 15:56:04</Created>
</PackageHeader>
<RedefinableHeader PublicationStatus="UNDER_TEST"/>
<ConformanceClass GraphConformance="NON_BLOCKED"/>
<Script Type="text/x-xpath" Version="1.0"/>
<TypeDeclarations>
</TypeDeclarations>
<WorkflowProcesses>
<WorkflowProcess AccessLevel="PUBLIC" Id="doc-appro" Name="Document Approval">
<ProcessHeader DurationUnit="D">
<Created>2004-08-08 15:57:34</Created>
<Description>Drives the process of approving a document.</Description>
</ProcessHeader>
<RedefinableHeader PublicationStatus="UNDER_TEST">
<Author>Adrian Price</Author>
</RedefinableHeader>
<FormalParameters>
<FormalParameter Id="docUri" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The URI of the document under review.</Description>
</FormalParameter>
</FormalParameters>
<DataFields>
<DataField Id="peerApproved" IsArray="FALSE">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</DataField>
<DataField Id="peerComments" IsArray="FALSE">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="vpSalesApproved" IsArray="FALSE">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</DataField>
<DataField Id="vpSalesComments" IsArray="FALSE">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="dirCommsApproved" IsArray="FALSE">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</DataField>
<DataField Id="dirCommsComments" IsArray="FALSE">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="ceoApproved" IsArray="FALSE">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</DataField>
<DataField Id="ceoComments" IsArray="FALSE">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
</DataFields>
<Participants>
<Participant Id="Submittor" Name="Document Submittor">
<ParticipantType Type="ROLE"/>
<Description>This role represents the person submitting the document for approval.</Description>
</Participant>
<Participant Id="Sales" Name="Peer reviewers in Sales Dept.">
<ParticipantType Type="ORGANIZATIONAL_UNIT"/>
</Participant>
<Participant Id="VPSales" Name="Vice President of Sales">
<ParticipantType Type="ROLE"/>
</Participant>
<Participant Id="DirCom" Name="Director of Communications">
<ParticipantType Type="ROLE"/>
</Participant>
<Participant Id="CEO" Name="Chief Executive Officer">
<ParticipantType Type="ROLE"/>
</Participant>
</Participants>
<Applications>
<Application Id="browser" Name="Web Browser">
<Description>
This tool agent uses the shell file associations of the
underlying platform to invoke the appropriate editor for
the document type referred to in the supplied URL. The
URL can be that of a web application, external web site,
a file in a WebDAV document repository. Basically, any
resource that can be accessed through a URL and for
which the host browser has a protocol handler registered.
N.B. The browser also acts as a document launcher - there
is no need for the separate 'start' tool referred to in
the original exercise description.
</Description>
<FormalParameters>
<FormalParameter Id="url" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The URL of the document or web application to open.</Description>
</FormalParameter>
</FormalParameters>
</Application>
<Application Id="obe.editDocument" Name="Document Editor">
<!-- <ExternalReference location="obe.editDocument"/>-->
<FormalParameters>
<FormalParameter Id="url" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The URL of the document or web application to open.</Description>
</FormalParameter>
</FormalParameters>
</Application>
<Application Id="obe.viewDocument" Name="Document Viewer">
<!-- <ExternalReference location="obe.viewDocument"/>-->
<FormalParameters>
<FormalParameter Id="url" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The URL of the document or web application to open.</Description>
</FormalParameter>
</FormalParameters>
</Application>
<Application Id="obe.updateProcessAttributes" Name="Update Process Attributes">
<Description>Displays a form to allow process variables to be updated.</Description>
<ExternalReference location="obe.updateProcessAttributes"/>
</Application>
<Application Id="obe.assignProcessAttribute">
<Description>This procedure sets a process instance attribute.</Description>
<FormalParameters>
<FormalParameter Id="attrName" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The name of the process instance attribute.</Description>
</FormalParameter>
<FormalParameter Id="attrValue" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Description>The value to assign attribute.</Description>
</FormalParameter>
</FormalParameters>
</Application>
</Applications>
<Activities>
<Activity Id="a10" Name="Route">
<Description>This route activity is present because XPDL does not permit a loopback to the start activity.</Description>
<Route/>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="Submittor"/>
<ExtendedAttribute Name="XOffset" Value="150"/>
<ExtendedAttribute Name="YOffset" Value="40"/>
</ExtendedAttributes>
</Activity>
<Activity Id="edit-doc" Name="Edit Document">
<Implementation>
<Tool Id="obe.editDocument" Type="APPLICATION">
<ActualParameters>
<ActualParameter>$docUri</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>Submittor</Performer>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="Submittor"/>
<ExtendedAttribute Name="XOffset" Value="270"/>
<ExtendedAttribute Name="YOffset" Value="40"/>
</ExtendedAttributes>
</Activity>
<Activity Id="peer-rev" Name="Peer Review">
<Limit>3D</Limit>
<Implementation>
<Tool Id="obe.viewDocument" Type="APPLICATION">
<ActualParameters>
<ActualParameter>$docUri</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="obe.updateProcessAttributes" Type="APPLICATION">
<ActualParameters>
<ActualParameter>peerApproved</ActualParameter>
<ActualParameter>peerComments</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>Sales</Performer>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<Deadline Execution="SYNCHR">
<DeadlineCondition>3D</DeadlineCondition>
<ExceptionName>timeout</ExceptionName>
</Deadline>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
<Split Type="XOR">
<TransitionRefs>
<TransitionRef Id="peer-rej"/>
<TransitionRef Id="peer-app"/>
<TransitionRef Id="peer-tmo"/>
</TransitionRefs>
</Split>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="Sales"/>
<ExtendedAttribute Name="XOffset" Value="380"/>
<ExtendedAttribute Name="YOffset" Value="50"/>
<ExtendedAttribute Name="obe.ToolMode" Value="PARALLEL"/>
</ExtendedAttributes>
</Activity>
<Activity Id="a6" Name="(peer timeout)">
<Implementation>
<Tool Id="obe.assignProcessAttribute" Type="PROCEDURE">
<ActualParameters>
<ActualParameter>peerComments</ActualParameter>
<ActualParameter>'(timed out)'</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="Sales"/>
<ExtendedAttribute Name="XOffset" Value="490"/>
<ExtendedAttribute Name="YOffset" Value="50"/>
</ExtendedAttributes>
</Activity>
<Activity Id="vp-sales-rev" Name="VP Sales Review">
<Limit>3D</Limit>
<Implementation>
<Tool Id="obe.viewDocument" Type="APPLICATION">
<ActualParameters>
<ActualParameter>$docUri</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="obe.updateProcessAttributes" Type="APPLICATION">
<ActualParameters>
<ActualParameter>vpSalesApproved</ActualParameter>
<ActualParameter>vpSalesComments</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>VPSales</Performer>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<Deadline Execution="SYNCHR">
<DeadlineCondition>3D</DeadlineCondition>
<ExceptionName>timeout</ExceptionName>
</Deadline>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
<Split Type="XOR">
<TransitionRefs>
<TransitionRef Id="vp-sales-rej"/>
<TransitionRef Id="vp-sales-app"/>
<TransitionRef Id="vp-sales-tmo"/>
</TransitionRefs>
</Split>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="VPSales"/>
<ExtendedAttribute Name="XOffset" Value="490"/>
<ExtendedAttribute Name="YOffset" Value="50"/>
<ExtendedAttribute Name="obe.ToolMode" Value="PARALLEL"/>
</ExtendedAttributes>
</Activity>
<Activity Id="a7" Name="(vp sales timeout)">
<Implementation>
<Tool Id="obe.assignProcessAttribute" Type="PROCEDURE">
<ActualParameters>
<ActualParameter>vpSalesComments</ActualParameter>
<ActualParameter>'(timed out)'</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="VPSales"/>
<ExtendedAttribute Name="XOffset" Value="620"/>
<ExtendedAttribute Name="YOffset" Value="50"/>
</ExtendedAttributes>
</Activity>
<Activity Id="dc-rev" Name="Director of Communications Review">
<Limit>3D</Limit>
<Implementation>
<Tool Id="obe.viewDocument" Type="APPLICATION">
<ActualParameters>
<ActualParameter>$docUri</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="obe.updateProcessAttributes" Type="APPLICATION">
<ActualParameters>
<ActualParameter>dirCommsApproved</ActualParameter>
<ActualParameter>dirCommsComments</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>DirCom</Performer>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<Deadline Execution="SYNCHR">
<DeadlineCondition>3D</DeadlineCondition>
<ExceptionName>timeout</ExceptionName>
</Deadline>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
<Split Type="XOR">
<TransitionRefs>
<TransitionRef Id="dir-comm-app"/>
<TransitionRef Id="dir-comm-tmo"/>
<TransitionRef Id="dir-comm-rej"/>
</TransitionRefs>
</Split>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="DirCom"/>
<ExtendedAttribute Name="XOffset" Value="620"/>
<ExtendedAttribute Name="YOffset" Value="60"/>
<ExtendedAttribute Name="obe.ToolMode" Value="PARALLEL"/>
</ExtendedAttributes>
</Activity>
<Activity Id="a8" Name="(dir comms timeout)">
<Implementation>
<Tool Id="obe.assignProcessAttribute" Type="PROCEDURE">
<ActualParameters>
<ActualParameter>dirCommsComments</ActualParameter>
<ActualParameter>'(timed out)'</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="DirCom"/>
<ExtendedAttribute Name="XOffset" Value="750"/>
<ExtendedAttribute Name="YOffset" Value="60"/>
</ExtendedAttributes>
</Activity>
<Activity Id="ceo-rev" Name="Chief Executive Officer Review">
<Limit>3D</Limit>
<Implementation>
<Tool Id="obe.viewDocument" Type="APPLICATION">
<ActualParameters>
<ActualParameter>$docUri</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="obe.updateProcessAttributes" Type="APPLICATION">
<ActualParameters>
<ActualParameter>ceoApproved</ActualParameter>
<ActualParameter>ceoComments</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>CEO</Performer>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
<Split Type="XOR">
<TransitionRefs>
<TransitionRef Id="ceo-app"/>
<TransitionRef Id="ceo-rej"/>
</TransitionRefs>
</Split>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="CEO"/>
<ExtendedAttribute Name="XOffset" Value="750"/>
<ExtendedAttribute Name="YOffset" Value="60"/>
<ExtendedAttribute Name="obe.ToolMode" Value="PARALLEL"/>
</ExtendedAttributes>
</Activity>
<Activity Id="a11" Name="Route">
<Description>This route activity is present because XPDL does not permit a loopback from the exit activity.</Description>
<Route/>
<StartMode>
<Automatic/>
</StartMode>
<FinishMode>
<Automatic/>
</FinishMode>
<ExtendedAttributes>
<ExtendedAttribute Name="ParticipantID" Value="CEO"/>
<ExtendedAttribute Name="XOffset" Value="920"/>
<ExtendedAttribute Name="YOffset" Value="60"/>
</ExtendedAttributes>
</Activity>
</Activities>
<Transitions>
<Transition From="a10" Id="t15" Name="Transition" To="edit-doc">
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="edit-doc" Id="submit" Name="Document Submitted" To="peer-rev">
<Description>The originator submits the document for peer review.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="peer-rev" Id="peer-rej" Name="Peers Rejected" To="edit-doc">
<Condition Type="OTHERWISE"/>
<Description>The Peer Reviewers have rejected the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
<ExtendedAttribute Name="BreakPoint" Value="310;220;1"/>
</ExtendedAttributes>
</Transition>
<Transition From="peer-rev" Id="peer-app" Name="Peers Approved" To="vp-sales-rev">
<Condition Type="CONDITION">$peerApproved</Condition>
<Description>The peer reviewers have approved the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="peer-rev" Id="peer-tmo" Name="Peer Review Timed Out" To="a6">
<Condition Type="EXCEPTION">timeout</Condition>
<Description>This transition is fired when the 3-day deadline expires.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="a6" Id="t11" To="vp-sales-rev">
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="vp-sales-rev" Id="vp-sales-app" Name="VP Sales Approved" To="dc-rev">
<Condition Type="CONDITION">$vpSalesApproved</Condition>
<Description>The VP of Sales has approved the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="vp-sales-rev" Id="vp-sales-rej" Name="VP Sales Rejected" To="peer-rev">
<Condition Type="OTHERWISE"/>
<Description>The VP of Sales has rejected the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
<ExtendedAttribute Name="BreakPoint" Value="420;370;1"/>
</ExtendedAttributes>
</Transition>
<Transition From="vp-sales-rev" Id="vp-sales-tmo" Name="VP Sales Review Timed Out" To="a7">
<Condition Type="EXCEPTION">timeout</Condition>
<Description>This transition is fired when the 3-day deadline expires.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="a7" Id="t12" To="dc-rev">
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="dc-rev" Id="dir-comm-app" Name="Director of Comms Approved" To="ceo-rev">
<Condition Type="CONDITION">$dirCommsApproved</Condition>
<Description>The Director of Communications has approved the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="dc-rev" Id="dir-comm-rej" Name="Dir Comms Rejected" To="vp-sales-rev">
<Condition Type="OTHERWISE"/>
<Description>The Director of Communications has rejected the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
<ExtendedAttribute Name="BreakPoint" Value="530;530;1"/>
</ExtendedAttributes>
</Transition>
<Transition From="dc-rev" Id="dir-comm-tmo" Name="Director of Communications Review Timed Out" To="a8">
<Condition Type="EXCEPTION">timeout</Condition>
<Description>This transition is fired when the 3-day deadline expires.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="a8" Id="t13" To="ceo-rev">
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="ceo-rev" Id="ceo-app" Name="CEO Approved" To="a11">
<Condition Type="CONDITION">$ceoApproved</Condition>
<Description>The Chief Executive Officer has approved the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
</ExtendedAttributes>
</Transition>
<Transition From="ceo-rev" Id="ceo-rej" Name="CEO Rejected" To="dc-rev">
<Condition Type="OTHERWISE"/>
<Description>The Chief Executive Officer has rejected the document.</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>
<ExtendedAttribute Name="BreakPoint" Value="660;680;1"/>
</ExtendedAttributes>
</Transition>
</Transitions>
<ExtendedAttributes>
<!-- Workflow can be triggered by the creation of a new document via WebDAV. -->
<ExtendedAttribute Name="obe.Event">
<obe:Event Id="DocumentCreated">
<xpdl:ActualParameters>
<xpdl:ActualParameter>docUri</xpdl:ActualParameter>
</xpdl:ActualParameters>
</obe:Event>
</ExtendedAttribute>
<ExtendedAttribute Name="StartOfWorkflow" Value="Submittor;doc-appro_Act10;60;40;NOROUTING"/>
<ExtendedAttribute Name="EndOfWorkflow" Value="CEO;a11;1070;60;NOROUTING"/>
<ExtendedAttribute Name="ParticipantVisualOrder" Value="Submittor;Sales;VPSales;DirCom;CEO;"/>
</ExtendedAttributes>
</WorkflowProcess>
</WorkflowProcesses>
<ExtendedAttributes>
<ExtendedAttribute Name="MadeBy" Value="JaWE"/>
<ExtendedAttribute Name="Version" Value="1.2"/>
</ExtendedAttributes>
</Package>
Solution Files
See the solution files under $OBE_HOME/examples
:
config/processe
s/
document-approval
.xpdl
src/com/abc/example/ABCProcedures.java
Deployment and Execution
Since the workflow involves structured interactions with a document,
you need to have an installed application that's registered for the
document's
file type (e.g., OpenOffice for *.sxw files, MS-Word for *.doc
files). Because this workflow assumes a WebDAV store it is best
executed in the OBE J2EE server, which embeds such a store (implemented
by Jakarta Slide), rather than using the standalone workflow engine.
- Deploy the
document-approval.xpdl
package.
- Start a workflow instance by either:
- Instantiating an instance of the
doc-appro
workflow
from the Worklist client.
- Supplying the URL of the proposal document as prompted. The URL
can use the
file:
protocol or the http:
protocol in the case of a Web Folder (WebDAV document store).
- or
- Use WebDAV / Web Folders support to upload a document to the Slide
WebDAV store at http://localhost:8080/slide/files/ (substituting
a host name and port appropriate
to your application server). N.B.
The OBE Slide configuration is set up to request HTTP Basic
Authentication from the WebDAV client, so you will need to
authenticate
as a Slide user with the requisite permissions for uploading new
documents, such as
john
, john2
or
root
. By default the passwords are the same as the Slide
User IDs.
- Use the Worklist client to drive the process to completion by:
- Executing the
'peer-rev'
, 'vp-sales-rev'
,
'dc-rev'
and 'ceo-rev'
work items,
responding to the prompts in the worklist handler UI to record your
acceptance or rejection at each stage.
- Note how the Worklist handler uses the Operating System's
native File Type Associations to launch the appropriate application
and
how it presents a command line or graphical UI to capture the
'XxxApproved'
status at each stage.
- Experiment with rejecting an approval step and note how this
causes the workflow to loop back and reactivate a preceding
step.
- Experiment with changing the limit and deadline durations from
the original three days to shorter intervals of the order of
minutes or seconds, and note how the 'temporal status' activity
instance and work item attributes change from green (normal) ->
amber (warning) -> red (overdue), and how the deadline transition
fires when the item becomes overdue. N.B. such changes will only
affect
new or reactivated activity instances and work items.
Tip: OpenOffice and Microsoft Office both allow you
to save and
retrieve documents directly to/from a WebDAV URL. When uploading
to WebDAV, OpenOffice distinguishes document creations from document
updates,
causing Jakarta Slide to raise create
and store
respectively.
The $OBE_HOME/examples/config/BasicApplicationEventBroker.xml
file delivered with the OBE examples captures these Slide events into
the DocumentCreated and DocumentStored OBE application events respectively. The
document-approval
example workflow is triggered by the
DocumentCreated
event.
Microsoft Office, however, does not distinguish between create and update: it only ever causes
store
Slide events (corresponding to DocumentStored
OBE events). Thus MS Word, for example, is incapable of triggering the
document-approval workflow as is. If you wish to use MS Word to trigger
this workflow, amend the <xpdl:ExtendedAttribute
name="obe.Event">
element to react to the
DocumentStored
event instead. Be aware though that doing this will cause the erroneous
instantiation of the workflow when an existing document is just being
updated. This dilemma is under
investigation: it's possible that Slide can be amended to make the
create/store distinction automatically.