Professional Documents
Culture Documents
Inside Document Um Work Flow
Inside Document Um Work Flow
Inside Document Um Work Flow
9/9/01 12:43
Pang
9/9/01 12:43
Agenda
Concepts
Workflow and Lifecycle
Advanced Features
Automated activities Distributed workflow
Pang
9/9/01 12:43
Documentum Workflow
Mechanism to model a business process A network of tasks performed by a user or the system Flow of data from task to task Logic that governs the sequence of tasks
Engr. Approval Publish Mktg. Approval
Edit
Dept. Review
You can use Workflow to model a business process. Workflow is task centric. As in the example, there are Edit, Review, etc. You can define tasks to be performed by user manually or by the system automatically. For example, you can make Publish an automatic task. You can send different numbers of document in a workflow. You can set up the logic in the workflow to control the flow of the tasks. As in the Approval tasks, the next task can be forwarded to Publish or rejected to Edit.
Pang
9/9/01 12:43
Documentum Lifecycle
Mechanism to specify the location, security, ownership and other policies that govern the document in each phase of its existence Modeled as a sequence of states and the transitions between them
Entry Criteria Actions Post Actions
Author
Review
Publish Withdrawn
Retire
Lifecycle is document centric. Lifecycle is used to control the location, security, ownership etc for different phases of the document. To use Lifecycle, you define phases or states for a document. In each state the document has different control parameters such as location, permission and ownership. You use Lifecycle to control the transition of the states and therefore the document's control parameters. You can define transition tests and actions to be run as Entry Criteria, Action, or Post Action during the state transition.
Pang
9/9/01 12:43
A document can only have one Lifecycle at a given time. But it can participate in many Workflow processes. Lifecycle allows us to factor out the document policy from the business process. Lifecycle and Workflow often work in conjunction to produce the desired system behavior. We will go through this in more detail in the Workflow and Lifecycle topic which comes in later of the presentation.
Pang
9/9/01 12:43
Workflow Model
Process Design and Definition
Workflow Manager
Build Time
Workflow Templates
Run Time Process Instantiation and Control
This is a high level picture for DCTM workflow model. We have Workflow Manager to create the Workflow definition which is called workflow template. At runtime we create a workflow instance which refers to the workflow template. The server workflow engine controls the flow logic according to the workflow definition in the workflow template. User performs on the tasks through the client application. Or the task itself be performed by some applications.
Pang
9/9/01 12:43
Workflow Enactment
Workflow Manager Workflow Template
Interpreted by
Maintains
References
Content
update
Applications
Supervisor
Here we have a closer look at the Workflow functional components.Starting from the top, we have Workflow Manager which is used to create workflow template. Workflow template can also reference alias set and LDAP integration in its definition. Coming to the center of the diagram is the workflow runtime control. In the center is the Server Workflow Engine, maintained by Workflow Supervisor. It controls automated aspect of the business process The Workflow Engine references the the routing document (content). The Workflow Engine also maintains a set of workflow control data. It is used to control the processing of the existing tasks and to determine the next tasks. Going down to the bottom of the picture, task list is created for manual tasks. In this case, performer receives the task in the Inbox. He completes the task through the Task Manager interface of the client. For automatic tasks, the Workflow Engine will invoke the applications directly. Here the applications can talk to the Workflow Engine through server methods and/or DFC.
Pang
9/9/01 12:43
Business Process
used to create and manage
is managed by
Workflow Template
Process Definition
dm_process
Workflow Instance
Workflow Instance
dm_workflow
Activity
Activity Definition
dm_activity
Task
Work Item
dmi_workitem dmi_
associate with
Queue Item
dmi_queue_item dmi_queue_item
Package
dmi_package dmi_package
Here is the object model in DCTM server. * Business Process - what is intended to happen * On the left is the Design Time Definition. Workflow Template is defined by - Process Definition - dm_process, representation of whats intended to happen - Activity Definition - dm_activity, representation of whats intended to achieve at a logical step * On the right is the Run Time Management - Workflow Instance - dm_workflow, controls automated aspect of the business process and record runtime information of workflow - Task - record run time information of activity - Work Item - dmi_workitem, task allocated to task performers - Queue Item - dmi_queue_item, peer item for work item for querying in Inbox - Package - dmi_package, references documents and comments routed among task
Pang
9/9/01 12:43
Task
Queue Item
dmi_queue_item dmi_queue_item
invokes
Task
Work Item
Task Manager
manipulates
associate with
dmi_workitem dmi_
Queue Item
dmi_queue_item dmi_queue_item
Package
dmi_package dmi_package
Here is the object model in DCTM client. * Inbox - provides a list of tasks you are responsible for * Task Manager - provides details of a task and allows user to perform the task
Pang
9/9/01 12:43
Agenda
Concepts Building a Workflow
Simple Workflow Path Selection Dynamic Performer
Pang
10
9/9/01 12:43
1) Basic process of building a workflow * Log on the Workflow Manager. * Drag and drop the activity from template to the drawing panel * Connect the activities using the flow tool * Set the parameters in Activity Inspector and Flow Inspector * Save, validate and install the workflow template 2) Build a simple workflow * Start with a simple linear workflow template that contains signoff, repeat, and delegate * Template detail: Approve - allow delegate and repeat, require sign off
Pang
11
9/9/01 12:43
Activity Inspector
1) Basics of the Performer tab * Performer information * Delegate, reassign, and signoff information 2) Set Approve task for delegate, repeat, and signoff * Select the Approve activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Performer tab * Check the appropriate check boxes
Pang
12
9/9/01 12:43
Flow Inspector
1) Basics of the Package tab * Package information * Port/link definition 2) Add the package to the flows * Multi-select all the flows * Bring up the Flow Inspector by double click, menu item, or toolbar * Go to Packages tab * Add new package * You can change to an optional package from the Version column * Check apply to all selected check box * Apply
Pang
13
9/9/01 12:43
Start Workflow
1) Invoke Start Workflow * Log on to Desktop Client * Navigate to the installed workflow template * Invoke Start Workflow by double click or Open menu item 2) Start Workflow Component * Add package * Add comment and define who to send the comment to
Pang
14
9/9/01 12:43
Start Workflow
(1) Start with workflow template (2) Create workflow instance (3) Execute workflow
dm_activity Submit dm_activity Review dm_activity Approve dm_activity Publish
dm_process
Whats happening during Start Workflow 1) Start with workflow template * The workflow template objects: dm_process, a list of dm_activity objects 2) Create workflow instance * Create a dm_workflow object * dm_workflow points to the workflow template dm_process * Save dm_workflow * dm_workflow is in Dormant state 3) Run the workflow * Execute dm_workflow * dm_workflow is in Running state
Pang
15
9/9/01 12:43
Start Workflow
Task
dm_workflow
dmi_workitem Submit -----------------dormant dmi_queue_item Submit dmi_package Submit - Doc A dm_note comment
Whats happening when add package to the workflow 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process * dm_workflow is in Running state 3) Adding package to workflow triggers the start activities * Workflow receives the package * Required packages of the start activities are fulfilled, ready to start * Workflow engine creates the task objects: The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task is in Dormant state 4) Task in Inbox * Client Inbox queries dmi_queue_item for the user
Pang
16
9/9/01 12:43
Dormant
Execute
Running
Finished
Halt Restart
Resume Abort
Abort
Halted
Terminated
This diagram shows the the workflow states and the related API calls. API calls are in italic. Initially workflow is in Dormant state. Once execute, its in Running state. If the workflow runs smoothly to the end, it goes to Finished state. If there are any error during the execution of the workflow, it becomes Halted state. You can continue the workflow by restart or resume. At any time, you can abort the workflow and it changes to Terminated state.
Pang
17
9/9/01 12:43
Pang
18
9/9/01 12:43
Complete Task
1) Navigate to Inbox * Log on to Desktop Client * Navigate to Inbox 2) Invoke Task Manager * Select task in the Inbox Task is in Dormant (ready) state * Invoke Task Manager by double click or Open menu item 3) Task Manager Component * Task information * Document information and action * Comment reviewing, adding, deleting * Finish or reassign (delegate) 4) Finish Dialog of Task Manager * Finish the task or also have someone else repeat the task * Signoff requirement
Pang
19
9/9/01 12:43
Complete Task
(1) Task in Inbox (2) Acquire task (3) Complete task
dm_workflow
dmi_workitem Approve -----------------dormant acquired finished dmi_queue_item Approve dmi_package Approve-DocA dm_note
Whats happening when perform task in Inbox 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Task in Inbox * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task is in Dormant state 4) Open task in Task Manager * Task Manager acquires the task automatically * Task is in Acquired state 5) Finish task in Task Manager * Task Manager finishes the task * Task is in Finished state * Task is dequeued from Inbox
Pang
20
9/9/01 12:43
Complete Task
Create next task (task transition)
dm_workflow
dmi_workitem dmi_queue_item Approve Approve dmi_package Approve - DocA dm_note dmi_workitem Publish -------------dormant dmi_queue_item Publish dmi_package Publish - DocA Inbox --------- Publish
Whats happening when server finishes one task and creates the next task 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process * Workflow records the previous task is finished * Workflow Engine creates the new task and points to the new task 3) Previous task * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task is in Finished state * Task objects hangs around 4) Next task * The task objects contains: new dmi_workitem, new peer dmi_queue_item, new dmi_package to hold the document, existing dm_note to hold the user comments if any * Task is in Dormant state * Task appears in Inbox
Pang
21
9/9/01 12:43
Dormant
Reassign
Acquired
WF:Halt
Complete
Finished
Restart WF:Halt
Pause
Resume/ Reassign
Restart WF:Halt
D/A/P Paused
Paused
Restart
This diagram shows the the work item states and the related API calls. API calls are in italic. Initially work item is in Dormant state. Once acquired, it goes to Acquired state. If the work item completes, it becomes Finished. If there are any error during the execution of the work item, it becomes Paused state. You can continue the work item by resume. If at any time the workflow containing the work item is halted, the work item becomes DPaused, APaused, or PPaused depending on the original state of the work item. Once get into D, A, or P Paused state, the work item will go back to its original state only if the workflow is restarted.
Pang
22
9/9/01 12:43
Complete Task
Pang
23
9/9/01 12:43
Delegate Task
(1) Task in Inbox (2) Acquire task (3) Delegate task
dm_workflow
dmi_workitem dmi_workitem Approve Approve ----------------------------------acquired dormant dormant Manager David Martin
dmi_queue_item dmi_queue_item dmi_queue_item Approve Approve Approve ------------------------------------Manager David David Manager Martin dm_note Inbox (David) (David) Inbox (Martin) ---------------------------- Approve Approve Approve
dmi_package Approve-DocA
Whats happening when delegate task in Inbox 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Open Task in Task Manager from Inbox * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task changes from Dormant to Acquired state 4) Reassign task in Task Manager * Workflow Engine changes the performer name in dmi_workitem and dmi_queue_item * Task reset to Dormant state * Task removes from original performer Inbox and appears in the new performer Inbox
Pang
24
9/9/01 12:43
Repeat Task
(1) Task in Inbox (2) Acquire task (3) Repeat task (4) Complete task
dm_workflow dmi_workitem Approve ---------------David, Acquired Dormant David, Complete Martin, Dormant
dmi_queue_item Approve -------------David dmi_package Approve - DocA dm_note dmi_queue_item Approve -------------Martin
Whats happening when repeat task in Inbox 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Open task in Task Manager from Inbox * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task changes from Dormant to Acquired state 4) Repeat and finish task in Task Manager * Workflow Engine marks the original performer done with the task * Workflow Engine adds the new performer name to the dmi_workitem and creates new dmi_queue_item for the new performer * Task removes from original performer Inbox and appears in the new performer Inbox
Pang
25
9/9/01 12:43
Agenda
Concepts Building a Workflow
Simple Workflow Path Selection Dynamic Performer
Pang
26
9/9/01 12:43
Transition logic at Submit and Review Trigger logic at Revise Archive will wait on an event notification before it starts
Adding Peer Review such that multiple persons can review the document. Adding multiple Approve so that there can be multiple persons to sign off. Adding Archive activity. Changing the basic workflow template to multiple paths with decision logic for trigger and transition 1) Activities * Transition logic at Submit and Review Allow the performer of Submit and Review to determine the next tasks * Trigger logic at Revise Allow Revise to start when any of the previous activity has finished * Archive will wait on an event for notifying Publish is done before it starts 2) Flows * Reject flow from Review to Revise
Pang
27
9/9/01 12:43
1) Basics of the Transition tab * Determine what to do when the task is completed * Transition types: - all - all next tasks will be started - manual transition - performer chooses the next tasks (forward or reject) - auto transition - server picks the next tasks based on the condition defined 2) Set Submit task for manual transition * Select the Submit activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Transition tab * Check the appropriate radio button
Pang
28
9/9/01 12:43
1) Basics of the Trigger tab * Determine when to start this task * Trigger conditions: - all - all previous tasks are done - some - certain number of previous tasks are done - event - the task will not start until a certain event arrives * Number of times the activity can run 2) Set Revise task for manual transition * Select the Revise activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Trigger tab * Check the appropriate radio button and specify 1 input
Pang
29
9/9/01 12:43
Reject Path
There is no build-in reject path as compared to router. So you have to add the reject paths explicitly. 1) Set Review task for manual transition * Select the Review activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Transition tab * Check the appropriate radio button
Pang
30
9/9/01 12:43
Event Trigger
1) Set Archive task for event transition * Select the Archive activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Trigger tab * Check the wait on event check box and specify an event name
Pang
31
9/9/01 12:43
1) Navigate to Inbox * Log on to Desktop Client * Navigate to Inbox 2) Invoke Task Manager * Select task in the Inbox * Invoke Task Manager by double click or Open menu item * Task changes from Dormant to Acquired state 3) Finish Dialog of Task Manager * Finish the task by selecting the next activities
Pang
32
9/9/01 12:43
dm_process
dm_activity Approve2
dm_workflow
dmi_workitem Review -------------Next Task = Revise dmi_queue_item Review dmi_package Review - DocA
Whats happening during select next tasks 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Open task in Task Manager from Inbox * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task changes from Dormant to Acquired state 4) Select next tasks and finish * Workflow Engine marks the selected next tasks to the current work item * Task Manager finishes the task * Task is in Finished state * Task is dequeued from Inbox
Pang
33
9/9/01 12:43
Pang
34
9/9/01 12:43
dm_activity Current
dm_activity Next
dm_workflow
dmi_workitem Current dmi_queue_item ----------Current dmi_package finished Current dmi_workitem Next dmi_queue_item ----------Next dormant dmi_package
Next
Whats happening during task transition and triggering 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) The current task is finished * Task is in Finished state * Check the corresponding activity definition * Determine if the transition is all, manual, or auto * Find out the next task based on the transition conditions 4) Before creating the next task * Check the corresponding activity definition * Determine if the trigger conditions are fulfilled: number of previous finished tasks, wait on event * Workflow Engine waits if the trigger conditions are not fulfilled 5) Create the new task
Pang
35
9/9/01 12:43
Set sysObject = workflowObject Set queueId = sysObject.queue(toUserName, eventNameStr, priorityInt, sendMailBool, dueDate, messageStr) ... End Function
This wait on event mechanism is useful when you have a task that has to be performed externally to DCTM system. You will have a task (Publish) to notify the external agent and then finish to the next task. It will be the next task to wait for the finish event of the external agent. The external agent will perform its operation. When the external agent is done with the task, it simply notifies the workflow by sending a finish event. Once the workflow receives the event, the next task (Archive) will be triggered.
Pang
36
9/9/01 12:43
Agenda
Concepts Building a Workflow
Simple Workflow Path Selection Dynamic Performer
Pang
37
9/9/01 12:43
Submit chooses performer of PeerReview Performer for Approve will be the manager of the performer of Review
Changing Peer Review and Review from multiple to one activity. Changing their performers to be assigned dynamically. Changing the multi-path workflow template to single path with dynamic performer 1) Activities * Peer Review (performer to be chosen in Submit) Submit task performer will choose some users to perform on Peer Review * Review (performer to be resolved from previous task performer) Review will be performed by Revise performers manager
Pang
38
9/9/01 12:43
Peer Review
1) Basics of the Select Performer Wizard * performer types * Performer values: - Real user name - To be picked at runtime by some previous activities - To be resolved from alias set of document or previous performer 2) Set Peer Review performer to be select at runtime by Submit * Select the Peer Review activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Performer tab * Select Some Users from Group * Select to be assigned at runtime in activity Submit * Next to select a default group name * Define a real default group name
Pang
39
9/9/01 12:43
1) Navigate to Inbox * Log on to Desktop Client * Navigate to Inbox 2) Invoke Task Manager * Select task in the Inbox * Invoke Task Manager by double click or Open menu item * Task changes from Dormant to Acquired state 3) Finish Dialog of Task Manager * Select performers for Peer Performer task * Choose any number of users from the predefined group * Finish task
Pang
40
9/9/01 12:43
dmi_workitem Submit dmi_queue_item Submit dmi_package Submit - DocA Inbox --------- Submit
Whats happening during select dynamic performers 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Open task in Task Manager from Inbox * The task objects contains: dmi_workitem, peer dmi_queue_item, dmi_package to hold the document, dm_note to hold the user comments if any * Task changes from Dormant to Acquired state 4) Select dynamic performer * Workflow Engine marks the selected performers for Peer Review in dm_workflow object 5) Finish task * Task Manager finishes the task * Task is in Finished state * Task is dequeued from Inbox
Pang
41
9/9/01 12:43
dmi_workitem PeerReview dmi_queue_item ------------dmi_package PeerReview WriterGreen PeerReview DocA dmi_workitem PeerReview dmi_queue_item -------------dmi_package PeerReview WriterCooley PeerReview DocA
Whats happening during task transition using dynamic performer 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) The next task is determined * See detail in Task Transition for Trigger and Transition in previous slides 4) Before creating the next task * Check the corresponding activity definition * Determine if the performer is determined dynamically * Workflow Engine reads the performer selection from dm_workflow object 5) Create the new tasks
Pang
42
9/9/01 12:43
Pang
43
9/9/01 12:43
Review
Performer Alias
Assume the user has alias set which contains the manager alias. 1) Basics of the performer alias options in Select Performer Wizard * Workflow initiator defines * Resolve from specific alias set * Resolve from documents alias set * Resolve from previous performers alias set 2) Set Review performer to be resolved at runtime from previous performers alias set * Select the Review activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Performer tab * Select Specific User * Select to be resolved from alias set at runtime * Next to select resolve from previous performer
Pang
44
9/9/01 12:43
dm_process
dm_workflow
dmi_workitem Revise dmi_queue_item ------------WriterMary Revise dmi_package Revise - DocA dmi_workitem Review dmi_queue_item ---------------ManagerDavid Review dmi_package Review - DocA
dm_user WriterMary
Whats happening during task transition using performer alias 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) The next task is determined * See detail in Task Transition for Trigger and Transition in previous slides 4) Before creating the next task * Check the corresponding activity definition * Determine if the performer is determined from alias set * Workflow Engine resolves the alias name to a real user or group according to the resolution setting 5) Create the new tasks
Pang
45
9/9/01 12:43
Agenda
Concepts Building a Complex Workflow Advanced Features
Automated Activities Distributed workflow
Pang
46
9/9/01 12:43
Automatic Task
Publish and Archive become auto tasks
Changing Publish and Archive into automatic tasks 1) Activities * Publish and Archive Change to auto task to run workflow methods
Pang
47
9/9/01 12:43
Assuming Publish will be done in the lifecycle Action during document promote ==> Publish = Promote in WF 1) Basics of the Performer tab in Auto Mode * Performer * Execution method * Execution result * Execution time how long the server should run the method before timing out * Error handling
2) Set Publish to automatic activity * Select the Publish activity * Bring up the Activity Inspector by double click, menu item, or toolbar * Go to Performer tab * Select perform automatically * Select user in Select Performer Wizard * Select Promote method, save result, 60 seconds, and stop execution (60 sec has to be between the min and max attribute values on dm_method)
Pang
48
9/9/01 12:43
No Queue Item for Automatic Task! dm_workflow dmi_workitem Publish dmi_package Publish - DocA
Inbox ----------
Whats happening during select dynamic performers 1) The usual workflow template objects * The workflow template objects: dm_process, a list of dm_activity objects 2) The workflow instance * dm_workflow which points to the workflow template dm_process 3) Automatic task is created * The task objects contains: dmi_workitem, dmi_package to hold the document, dm_note to hold the user comments if any * No peer dmi_queue_item * Task references its auto method 4) Executing automatic task * Workflow Engine runs the method defined in dm_activity * Method acquires and completes the task * Workflow Engine saves execution log and handles error according to the dm_activity definition
Pang
49
9/9/01 12:43
Pang
50
9/9/01 12:43
Pang
51
9/9/01 12:43
Sub PromoteLifeCycle(ByVal stub1 As String, ByVal docbase As String, ByVal stub2 As String, _
lifeCycleOverride = False lifeCycleTestOnly = False ' Get a session. Set clientX = CreateObject("Documentum.Dfc") Set loginInfo = clientX.getLoginInfo() loginInfo.setUser user logininfo.setPassword ticket Set client = clientX.getLocalClient() Set session = client.getSharedSession(docbase, loginInfo, "WF_Auto_Method") ' Get work item object. Set workItem = session.GetObject(clientX.getId(workItemId)) ' Acquire the work item only when mode = "0" for not restarting. If mode = "0" Then workItem.acquire End If ' Promote document life cycle for each document. Set packageCollection = workItem.getPackages("") While packageCollection.Next docIdStr = packageCollection.getString("r_component_id") Set docIdObj = clientX.getId(docIdStr) Set doc = session.GetObject(docIdObj) doc.promote lifeCycleState, lifeCycleOverride, lifeCycleTestOnly Wend packageCollection.Close ' Complete the workitem. Assume there is only one output port for this task. workItem.complete Exit Sub PromoteLifeCycle_Error: Print errorMsg dmExit (100) End Sub
Pang
52
9/9/01 12:43
Pang
53
9/9/01 12:43
1) Navigate to Inbox * Log on to Desktop Client * Navigate to Inbox 2) Invoke Task Manager * Select task in the Inbox * Invoke Task Manager by double click or Open menu item * Notice the add-on to the instruction by the Desktop Client Task Manager 3) Finish task * Showing the execution log * Finish task by choosing either to - rerun the automatic method - no more human interaction - or, manually complete the task - get the normal Finish Dialog
Pang
54
9/9/01 12:43
Agenda
Concepts Building a Complex Workflow Advanced Features
Automated Activities Distributed workflow
Pang
55
9/9/01 12:43
Distributed Workflow
Distributed
route a foreign document route to a remote user
Federated environment
notion of home Docbase users, groups, types, and ACLs are known to all participating Docbases
Workflow definitions, workflow initiator, and all runtime objects are all in single Docbase Only queue item is replicated to users home Docbase
When a work item is assigned to a remote user, a work item and the peer queue item are generated in the Docbase where the process definition and the containing workflow reside. The notification agent for the source Docbase replicates the queue item in the users home Docbase. Using these queue items, the home Inbox connects to the source Docbase and retrieves all information necessary for the user to perform the work item tasks. A remote user must be able to connect to the source Docbase to work on a replicated queue item.
Pang
56
9/9/01 12:43
Agenda
Concepts Building a Complex Workflow Advanced Features Workflow and Lifecycle
Lifecycle Procedures
Pang
57
9/9/01 12:43
Pang
58
9/9/01 12:43
Application 1
Author
Start WF
Promote
Submit
Approve
Publish
Review
Example using document Lifecycle to drive Workflow process * When document is promoted from Author to In Review state, the state transition logic of In Review triggers to start workflow, providing the document as the content for the workflow * The workflow continues to Submit, Review, Approve and Publish * Publish invokes the promote Lifecycle method. The document is promoted to Published state from In Review state
Pang
59
9/9/01 12:43
Application 2
Author
Promote S Submit
Promote
Review
Publish
Auto Promote
Approve
Example using Workflow process to drive document Lifecycle * Starting from a workflow, after the document is submitted, workflow runs an automatic promote Lifecycle task on the document * Document is promoted from Author to In Review state * The workflow continues to Review, Approve and Publish * Publish invokes the promote Lifecycle method. The document is promoted to Published state from In Review state
Pang
60
9/9/01 12:43
Promote
Lifecycle Transition
Entry Criteria Success?
Yes No
During the promote, server goes through a sequence of tests/standard actions/procedures as defined in a state of a Lifecycle. These steps are done in a transaction. For each state of a Lifecycle, there are Entry Criteria, Action, and Post Action. You can define the transition tests, standard actions and/or procedures for each of these steps in DDS. During a promotion, the Entry Criteria will be executed. If it fails, the transaction will be aborted and the promotion fails. If the Entry Criteria succeeds, the Lifecycle state of the document will be changed to the next state. And then the Actions will be executed. If it fails, the transaction will be aborted and the promotion fails. After Actions, the Post Actions will be executed and the transaction will be completed. The promotion does not depend on the result of the Post Actions.
Pang
61
9/9/01 12:43
Lifecycle Procedures
Sample procedure
launching Workflow from Lifecycle
Pang
62
9/9/01 12:43
' Find out start activities id and names. ErrorStack = "Getting workflow start activity ids" Set actIdList = wfBuilder.getStartActivityIds() ErrorStack = "Getting workflow start activity names" Set actNameList = wfBuilder.getStartActivityNames() ' For each start activity/package, add package. ErrorStack = "Looping start activities to add package" actCount = actIdList.getCount For actIndex = 0 To actCount - 1 ErrorStack = "Getting workflow start activity index =" _ + Str(actIndex) Set actId = actIdList.getId(actIndex) Set act = session.getObject(actId) actName = actNameList.getString(actIndex) pkgCount = act.getPackageCount() For pkgIndex = 0 To pkgCount - 1 portType = act.getPortType(pkgIndex) If portType = "INPUT" Then portName = act.getPortName(pkgIndex) pkgName = act.getPackageName(pkgIndex) pkgLabel = act.getPackageLabel(pkgIndex) pkgType = act.getPackageType(pkgIndex) ' Attach the current document. ErrorStack = "Adding package to activity=" + _ actName + ",pkgName=" + pkgName wfBuilder.addPackage actName, portName, _ pkgName, pkgType, _ "This is a note", False, _ docIdList End If Next pkgIndex Next actIndex ' Sucess and done. EntryCriteria = True Exit Function EntryCriteria_Error: ' Error handling. Print ErrorStack EntryCriteria = False End Function
Pang
63
9/9/01 12:43
Questions?
Pang
64
9/9/01 12:43
Summary
Workflow features
Build a complex workflow Run workflow using DFC Server runtime object detail
Pang
65
9/9/01 12:43
Pang
66