1.24k likes | 1.43k Views
Chapter 2 The Language: Rationale and Fundamentals (Part IV). Nick Russell Arthur ter Hofstede. Outline. Part I Petri nets Workflow nets Reset nets Part II Background – WfMS and PAIS Conceptual Foundations the Workflow Patterns Initiative Control-flow patterns Part III
E N D
Chapter 2The Language: Rationale and Fundamentals(Part IV) Nick Russell Arthur ter Hofstede
Outline • Part I • Petri nets • Workflow nets • Reset nets • Part II • Background – WfMS and PAIS • Conceptual Foundations • the Workflow Patterns Initiative • Control-flow patterns • Part III • Control-flow in YAWL • Part IV • Data patterns • Resource patterns
Workflow Patterns Framework 2000 2003 Jun 2005 Oct 2005 Jun 2006 Sep 2006 revised Resource P:s - 43 Data P:s - 40 Control-flow P:s 20 Control-flow P:s 43 Exception P:s N. Russell W. van der Aalst A. ter Hofstede D. Edmond N. Russell A. ter Hofstede W. van der Aalst N. Mulyar N. Russell W. van der Aalst A. ter Hofstede W. van der Aalst A. ter Hofstede B. Kiepuszewski A. Barros N. Russell A. ter Hofstede D. Edmond W. van der Aalst Exception handling in a process Resource definition & work distribution in a process Data representation and handling in a process The ordering of activities in a process • - 23 new patterns • Formalised in • CPN notation CAiSE’2005 ER’2005 CoopIS’2000 DAPD’2003 TR CAiSE’2006 These perspectives follow S. Jablonski and C. Bussler’s classification from: Workflow Management: Modeling Concepts, Architecture, and Implementation. International Thomson Computer Press, 1996 time www.workflowpatterns.com
Workflow Patterns Framework The Workflow Data Patterns
Data Pattern Categories Data Visibility: • The extent and manner in which data elements can be viewed and utilised by workflow components. Internal Data Interaction: • Data communication between active elements within a workflow. External Data Interaction: • Data communication between active elements within a workflow and the external operating environment. Data Transfer: • Data element transfer across the interface of a workflow component. Data Routing: • The manner in which data elements can influence the operation of the workflow.
Data Visibility Patterns The extent and manner in which data elements can be viewed by workflow components • Task data • Block data • Scope data • Multiple instance data • Case data • Folder data • Workflow data • Environment data
Data Visibility Scopes Block Task Scope Case
Task Data Data visibility restricted to single task instance
Block Data Data visibility restricted to tasks in single block or workflow net in a process instance
Scope Data Data visibility restricted to set of tasks in single process instance
Multiple Instance Data • Multiple instance: • Designated multiple instance task • Shared implementation of decomposed tasks • Multiply triggered task
Multiple Instance Data Solutions • UML 2.0 AD Supported + ExpansionKind + Loop + Shared decomp. • BPMN Partially supported - MI + Loop + Shared decomp.
Case Data Data visibility restricted to all tasks in single process instance
Folder Data case-1 use(folder-A) Case data repository A use(X) B use(X) C use(X) folder-A def var X case-2 use(folder-A) A use(X) B use(X) C use(X) folder-B def var Y case-3 use(folder-A, folder-B) A use(X,Y) B use(X,Y) C use(X,Y)
Task and Block Data in YAWL task data task data block data
Data Interaction Patterns: Internal Data communication between active elements within a workflow • Data interaction between tasks • Block task to sub-workflow decomposition • Sub-workflow decomposition to block task • To multiple instance task • From multiple instance task • Case to case
Data Interaction between Tasks Integrated Control and Data Channels B use(X) C use(Y) A use(X,Y) pass(X,Y) pass(Y) • Single integrated control-flow and data channel • Synchronous passing of control-flow and data between preceding and subsequent task(s) • Data passing approach used by YAWL and BPEL
Data Interaction between TasksApproach 1: Integrated Conrol and Data Channels
Data Interaction between Tasks Distinct Control and Data Channels B use(X) C use(Y) A use(X,Y) pass(X) pass(Y) • Different control-flow and data channel • Timing considerations in order to ensure both control-flow and data arrive at tasks at the required time • Used by WebSphere where data passing is based on the notion of containers sent between tasks
Data Interaction between TasksApproach 2: Distinct Control-Flow and Data Channels
Data Interaction between Tasks No Explicit Data Passing Global Shared Data def var X def var Y B use(X) C use(Y) A use(X,Y) • No explicit data passing • Data elements held in global data store and used by tasks when required • Data passing approach used by Staffware, FLOWer, COSA, BPMN, etc.
Task-to-Task Data Interaction in YAWL via net variables
Data Interaction: Task to/from SubworkflowApproach 1: Implicit Data Passing • Data in the block task is accessible to all sub-tasks which make up the underlying implementation. i.e. the main block task and the corresponding subworkflow share the same address space • No explicit data passing is necessary. • Data passing approach used by FLOWer, COSA, BPMN
Data Interaction: Task to/from SubworkflowApproach 2: Explicit Data Passing using Parameters • Data elements in the block task must be specifically passed as parameters to the underlying subworkflow • Mapping strategy required between block and subworkflow data elements • Data passing approach used by YAWL, WebSphere MQ, BPMN, UML 2.0 ADs
Data Interaction: Task to/from SubworkflowApproach 3: Explicit Data Passing using Data Channels • Data elements in the block task are specifically passed via data channels to all tasks in the subworkflow that require access to them • Data passing approach used by Staffware
Data Interaction – To/From Multiple Instance Tasks Instance-Specific Data Passed by Value instances B3 use(m[3]) A use(M) B2 use(m[2]) C use(M) pass(M) pass(M) B1 use(m[1]) (not supported in UML 2.0, BPMN) multiple instance task
Data Interaction – To/From Multiple Instance Tasks shared data storage Instance-Specific Data Passed by Reference array M: 1 2 3 4 .. instances B3 use(*m[3]) A use(&M) B2 use(*m[2]) C use(*M) pass(&M) pass(&M) B1 use(*m[1]) (not supported in BPMN) multiple instance task
Data Interaction – To/From Multiple Instance Tasks shared data storage Shared Data Passed by Reference var M: instances B3 use(*m[3]) A use(&M) B2 use(*m[2]) C use(*M) pass(&M) pass(&M) B1 use(*m[1]) (not supported in UML 2.0, BPMN) multiple instance task
MI data in YAWL(source: YAWL User Manual) Four XQueries are used to specify how data is passed to and from the instances of a multiple instances task. accessor query for manipulating the overall multiple instance data before the unique values are split out (to individual execution instances); splitter query for separating the unique values from the overall multiple instance data and passing a unique value to each instance; instance query for transforming the XML document returned on completion of an instance to a form that is suitable for aggregation; aggregate query for generating an overall result and passing the result to the higher level on completion of the multiple instance task.
MI data in YAWL MI task task data
Data Interaction Patterns: External Data communication between active elements within a workflow and the external operating environment. • Task to Environment – Push-Oriented • Environment to Task – Pull-Oriented • Environment to Task – Push-Oriented • Task to Environment – Pull-Oriented • Case to Environment – Push-Oriented • Environment to Case – Pull-Oriented • Environment to Case – Push-Oriented • Case to Environment – Pull-Oriented • Workflow to Environment – Push-Oriented • Environment to Workflow – Pull-Oriented • Environment to Workflow – Push-Oriented • Workflow to Environment – Pull-Oriented
Data Interaction - Task to/from Environment external process case pattern 14 B pass(M) def var S def var T pattern 15 D def var M A request(T) pass(T) pattern 16 C E def var N pass(S) pattern 17 request(N) pass(N)
Data Interaction: Task – Environment - 1 • Interaction initiated by task • Environment receives data • Interaction initiated by task • Task receives data
Data Interaction: Task – Environment - 2 • Interaction initiated by env. • Task receives data • Interaction initiated by env. • Environment receives data
Data Transfer Patterns Focus on the means by which a data element is transferred across the interface of a workflow component. • Data Transfer by Value – Incoming • Data Transfer by Value – Outgoing • Data Transfer – Copy In/Copy Out • Data Transfer by Reference – Unlocked • Data Transfer by Reference – Locked • Data Transformation – Input • Data Transformation – Output
Data Transfer by Value var G var H transient variable transient variable A use(R) B use(S) par in def var T:=H par in def var S:=G C use(T) par out ret R→G par out ret S→H
Data Transfer by Value The ability of a workflow component to receive incoming data elements by value relieving it from the need to have shared names or common address space with the component(s) from which it receives them.
Data Transformation var G transient variable par out return transform(R)→G par in def var S:= prepare(G) B use(S) A use(R)
Data Transformation Ability to apply a transformation function to a data element during passing between workflow components.
Data Routing Patterns Focus on the manner in which data elements can influence the operation of the workflow • Task Precondition - Data Existence • Task Precondition - Data Value • Task Postcondition – Data Existence • Task Postcondition - Data Value • Event-based Task Trigger • Data-based Task Trigger • Data-based Routing
Task Postcondition – Data Existence not exists(R) par out return(R) postcondition exist(R) A use(R) par in def var S:=R B use(S)
Event-based Task Trigger Start_A() Start_B() task task Start_C() task
Data-based Routing workflow workflow repository def var M 2.7 case repository def var N case B AB02 R > 10 par out ret R A C M > 3.1 N <> AB01 D