View
46
Download
0
Category
Tags:
Preview:
DESCRIPTION
Use of UML and Model Transformations for Workflow Process Definitions. Audris Kalnins, Valdis Vitolins University of Latvia, IMCS Baltic DB&IS '2006, July 3-6, Vilnius, Lithuania. Agenda. Current workflow modeling topics Required aspects of workflow definition Workflow definition languages - PowerPoint PPT Presentation
Citation preview
Use of UML and Model Transformations for Workflow Process Definitions
Audris Kalnins, Valdis VitolinsUniversity of Latvia, IMCS
Baltic DB&IS '2006, July 3-6, Vilnius, Lithuania
Agenda● Current workflow modeling topics
Required aspects of workflow definition
Workflow definition languages
MDD approach with model transformations as a novel solution in business modeling area
● Adjusting UML Activity Diagram for workflow definition AD subset for workflow definitions, Workflow Profile for AD
● BPMN diagrams as another notation for workflows BPMN subset, adjustments and additions
● Demo AD to BPMN transformation
● Conclusion
Current workflow modeling topics
● Workflow systems: have become completely distributed and global,
rely on web services as an implementation platform,
converge with ERP and EAI systems,
but till have to support humans in their business activities.
● Many different authorities: bunch of organizations (W3C, WfMC, OMG, OASIS, AIM, ...),
heap of standards (UML, BPMN, BPEL, WSCL, WSCI, ebXML, ...).
● Only two of these standards provide an easy readable graphical notation for workflow processes:
UML Activity Diagrams (AD) and
Business Process Modeling Notation (BPMN),
therefore as a proof of technique AD and BPMN have been chosen.
“Workflow complete" workflow system requirements● Adequate description of the control structure of the process – support
for branching, decisions, parallelization, synchronization and loops.● Possibility to model data flows and to base decisions, looping and
branching on process data. Process data should support rich data structures.
● Possibility to define different types of tasks:
a) for invocation of a workflow subprocesses,
b) automated tasks, which are either executed by workflow engine directly (Script Task), or by some sort of automated software service (Service Task, e.g. for Web services),
c) tasks where a human performer performs the task with the assistance of a software application (User Task),
d) tasks which are expected to be performed without aid of the workflow system (Manual Task).
● Resource management – mainly, the definition and management of human task performers.
AD subset for workflow definition
AD notation has a vast majority of features, most of which make no sense for workflow definition. As a suitable subset for workflow modeling the following elements are chosen :
● Activities and OpaqueBehaviors● CallActions:
CallBehavior, CallOperation actions SendSignal, AcceptEvent actions
● ObjectNodes: ActivityParameter nodes Input and Output pins
● Variables with Read and WriteVariable actions● Control nodes (Initial, ActivityFinal, FlowFinal, Fork, Join, Decision, Merge)
● Control and Object Flows● ActivityPartitions, Interruptible Regions, Loop Nodes
Classes which have Workflow Profile (AD stereotypes) applied, are described in the format Class – Stereotype.
AD subset for workflow definitionActivities and Opaque behaviors
Activity - MainProcess represents an activity which is a separate workflow process
Behavior - ManualAction, UserAction, ScriptAction - stereotypes for definitions of manual, software-supported manual and automated tasks
Operation - ServiceOperation stereotype for web service operation
Manual actions
User actions
Script actions
Service actions (external automated tasks – web service operations ir our case)
AD subset for workflow definitionCallActions:
CallBehavior, CallManual, CallSript, CallUser, CallOperation Actions
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
(Sales)
MakeOrder
(Sales)
ReviewInvoice
Prepare Payment
ReceiveOrder
PrepareInvoice
Process Order
(Accountant)
Close Order
CheckAndReserveItem
OrderProduct
CheckProduct
(Serviceman)
Pick Products in Package
(Serviceman)
ShipPackage
CallBehaviorAction – CallManualAction, CallScriptAction, CallUserAction – calls to stereotyped actions
CallOperationAction - CallServiceAction is an automated task, which means invoking an interface of an external software component
AD subset for workflow definitionSendSignal, AcceptEvent Actions
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
After 1 d
SendOrder
InvoiceInvoice.orderId=order.id
SendCancelRequest
SendPayment
OrderOrder.id=order.id
AcceptEventAction - StartAcceptEventAction - a new activity instance is started (createInstance="yes" in BPEL). IntermAacceptEventAction only activates the suspended activity
Order
CancelReques t.orderId=order.id
CancelReques t
SendInvoice
Payment
Payment.orderId=order.id
SendOrder
AD subset for workflow definitionObjectNodes:
ActivityParameter nodes
InputPins and OutputPins
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
Order
Order
AD subset for workflow definitionVariables, ReadVariable- and WriteVariableActions
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
order:=Order
order : Order:=order
order : Order
:=order
order:=Order
AD subset for workflow definitionControl nodes:
Initial, ActivityFinal, FlowFinal, Fork, Join, Decision, Merge
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
AD subset for workflow definitionControl and Object Flows
Order
order : Order
Prepare Payment
SendPayment
SendCancelRequest
(Sales)MakeOrder
SendOrder
order:=Order
Invoice
:=order
(Sales)ReviewInvoice
Payment Payment
Order
Invoice Invoice
Order
Order
[Order.s tatus=Cancelled]
Order
[Order.s tatus=Accepted]
Order
Order
Order
Order
(Serviceman)ShipPackage
(Serviceman)Pick Products in Package
CheckProduct
After 1 d
Order
Order
ForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
Order
[else]
[item.status=Reserved]
[else]
[Order.s tatus=Filled]
Order
[item.status=Waiting]
order:=CancelRequest
:=order
:=order
SendOrder
ReceiveOrder
(Accountant)Close Order
Order
Payment
CancelReques t
SendInvoice
Process Order
PrepareInvoice
order:=Order
Order
Order
Order
Order
[Order.s tatus=Accepted]
Order
Payment
Invoice
Invoice
Order
Order
[Order.s tatus=Rejected]
Order Order
Order
Order Order
CancelRequest
CancelRequest
AD subset for workflow definitionActivityPartitions, Interruptible Regions, Loop Nodes
(Serviceman)
Pick Products in Package
Order
After 1 d
(Serviceman)
ShipPackage Order
CheckProductForEach item in Order.items
CheckAndReserveItem
OrderProduct
[item.status=NotAvailable]
Order Order
[else]
[Order.s tatus=Filled]
Order
Order
[else]
[item.status=Waiting]
[item.status=Reserved]
(Accountant)Close Order
ForEach item in Order.items
(Serviceman)Pick Products in Package
(Serviceman)Pick Products in Package
(Sales)ReviewInvoice
(Sales)ReviewInvoice
Partition - Performer represents a performer of a manual or user action
LoopeNode - ForEach with heavyweight extension – new ForEach.collection association for loop iterator.
Fragment of the AD metamodel
source of model transformation
yellow – original classes
orange - stereotypes
ObjectNode
Operation
Activi tyGroup
Activi tyNode
Component
OrgUnit
Position
ForEach
MainProcesspartnerName : String
ServiceOperationoperation : String
ClassifierElement
InputPin
VariableAction
ReadVariableAction
Activi tyEdge
OutputPinActivityPartitionname : String
InterruptibleActivityRegion
Interface
CallOperationAction
IntermAEActionuri : StringpartnerLink : Stringoperation : String
ValueSpecificationexpression : String
CallBehaviorAction
WriteVariableAction
AcceptEventActionValuePin
LoopNode
Variable
Performer
Action
OpaqueBehaviorbody : Stringlanguage : String
Activityname : String
Behavior
Class
WebServiceuri : StringparnerLink : String
EndSSAction
CallServiceAction
IntermSSAction
CallManualAction
CallUserAction
CallScriptAction StartAEAction
ManualAction ScriptActionUserAction
context0..1 ow nedBehavior*
node *
base$OpaqueBehavior
ex tension$UserTask ex tension$ScriptTaskex tension$ManualTask
edge*
activity
class0..1nestedClassifier
*
input
*
bodyPart1
outgoing*source1
0..1
result1
output*result1
0..1
value1
test0..1
setupPart0..1
interface 0..1 ow nedOperation
*
class0..1
ow nedOperation *
ex tension$UserTaskex tension$ScriptTask
base$CallBehaviorAction
ex tension$ManualTask
ex tension$IntermSSAction
base$CallOperationAction
ex tension$Serv iceTask
ex tension$EndSSAction
containedNode*inGroup0..1
*
represents0..1
activityScope0..1
variable *
incoming*target 1
containedEdge
*
interrupts 0..1
interruptingEdge*
operation1
*
1 collection*
ex tension$IntermAEAction
base$AcceptEv entAction
scope0..1
variable* variable1
scope*
base$Componentex tension$WebServ ice
provided*
0..1value 1
base$Activ ityPartition
ex tension$Performer
base$LoopNode
ex tension$ForEach
activityGroup*
subGroup*
superGroup0..1
ex tension$Position
base$Class
ex tension$OrgUnit
guard1
behavior0..1
*
base$Operation
ex tension$Serv iceOperation
base$Activ ity
ex tension$MainProcess
BPMN subset for workflow definition
Similarly to the AD, BPMN also has unnecessary redundancy. Therefore as a suitable subset the following elements (which have natural semantics and mapping to BPEL) were chosen:
All types of ActivitiesUser, Service, Manual, Script Tasks, Embedded and Independent
Subrpocesses, LoopActivity Receive and Send Tasks for for receiving and sending
messages in non-interrupt situations Start and End Events, TimerIntermediate and
IntermediateEvents, attached to the boundary of an Activity ("interrupt construct")
All kinds of Gateways Properties and property Assignments
While the implicit BPMN metamodel is quite acceptable, the BPMN graphical notation lacks some important elements. Therefore for some elements new graphical notation is introduced.
BPMN subset for workflow definition
Following the BPMN style the following elements are used in model, but are not shown graphically:
Input/output Messages for tasks (analogs to AD pins), Implementation related aspects (e.g., service operation, URI).
Dropped elements: Intermediate events other than timer and "interrupt construct", Data Objects, MessageFlows
BPMN Property it is not sufficient for modeling rich data structures, therefore BPMN is supplemented with UML Class diagram similarly to AD.
BPMN subset for workflow definitionAll types of Activities:
User, Service, Manual, Script, Send, Receive Tasks
Independent Subprocess, LoopActivity
Task type is shown as task icon:Hand – manual,”S” – script, arrows – service, hand+arrows – user task, loop – loop activityTask performers are shown in another compartment
MakeOrder
performers: Sales
ReviewInvoice
performers: Sales
Prepare Payment
Prepare Invoice
Receive Order
Process Order
Close Order
ForEach item IN order.items
CheckProduct
Pick Products in Package
performers: Serviceman
ShipPackage
performers: Serviceman
BPMN subset for workflow definitionAll types of Activities:
Receive and Send Tasks for receiving and sending messages in non-interrupt situations
Convex flag – Send task, concave flag – Receive taskSimilarly to AD, data join criteria are shown as Annotations (an analog to Notes in AD)
Order
Invoice
order.id=invoice.orderId
CancelReques t
Payment
Order
sorder.id=order.id
Invoice
Payment
Payment.orderId=order.id
BPMN subset for workflow definition
All types of Activities:Embedded subproces for interrupt construction
BPMN subset for workflow definitionStart, End Events, TimerIntermediate Event, and IntermediateEvents,
attached to the boundary of an Activity ("interrupt construct")
BPMN subset for workflow definition
Properties and Assignments
Property is shown as a rectangle containing name:typeAssignment is shown as a thick arrow
order : Order
order := Order
order : Order
order := Order
order := CancelRequest
BPMN subset for workflow definition
All kinds of Gateways
BPMN subset for workflow definition
Sequence Flows
Customer Process
order := Order
Invoice
CancelReques t
Order
Payment
Prepare Payment
ReviewInvoiceperformers: Sales
MakeOrderperformers: Sales
Order
order.status=Cancelled
order.status=Accepted
Supplier Process
Close Order
order := Order
Receive Order
Payment
Prepare Invoice
Process OrderInvoice
order := CancelRequest
order.status=Rejected
order.status=Accepted
Process Order
CheckProduct
ForEach item IN order.items
Pick Products in Packageperformers: Serviceman
ShipPackageperformers: Serviceman
order.status=Filled
else
BPMN MetamodelTarget for model transformation
(subtypes for events are not shown)Process
name : StringprocessType : isAdHoc : Boolean
Propertyname : Stringtype : String
SequenceFlowconditionType : ConditionTypeconditionExpr : String
SupportElementname : String
PropertyMapexpression : String
Message
Assignmentexpression : StringassignTime : String
f
Participant
y
ReceiveTaskinstatiate : Booleanimplementation : String
ScriptTaskimplementation : String
Activi tyloopType : LoopTypeloopCondition : StringloopMaximum : Integer
BusinessProcessname : StringObject
Pool
SendTaskimplementation : String
Role
EntityTask
ManualTask
UserTaskimplementation : String
IndependentSubprocessisTransaction : Boolean
FlowObjectname : String
Event
GateGatewayStartEvent
MessageStartEvent
MessageEndEvent
MessageIntermedEvent
TerminateEndEvent
ServiceTaskimplementation : String
EmbeddedSubprocessisTransaction : BooleanisAdHoc : BooleanisCompensation : Boolean
assign *toProperty1
diagram1connections *
role1
objects
*pool1
* assignments
activity 0..1
properties
*
diagram
1
containedProcesses*
0..1
assignments*
process0..1
properties*
1
graphicalElements*
out*
source1
in*
target1
pool0..1
process0..1
entity1
0..1inMessage
0..10..1
outMessage 0..1
*
performers1..*
*
performers1..*
subProc1
inputMaps*
subProc1
outputMaps* to1
from1
message0..1
properties*
map
mappedProperty
caller*
diagramRef1
0..1
assignments*
1gates
*
pools *
participant1
1
pools 1..*
pk: Package
a: Activity
bp: BusinessProcessname := a.name
proc: Processname:="Process:"+a.name
pool: Poolname:=a.nameboundaryVisible:=true
{Activity = BusinessProcess + Pool + Process}
packageelement
packageelement
processsrc
dst
package
element
package
element
pools
Transformation as effective solution for AD to BPMN mappingThough graphical presentation looks similar, transformation is not trivial due to
conceptual differences between AD and BPMN:
toBp: Bus inessProcessact: Activ ity
intermss: IntermSendSignalAction
sendtask: SendTaskoper: Operation
param: Parameter msg: Messagename:=param.name
{IntermSendSignalAction+Operation+(WebService) = Task}
activity
dst
_objectDiagram
_bpObjec ts outMessage
operationCaller
operation
src
dstoperation
ow nedParameter
. . .
. . . . . .
More about MOLA:Tomorrow (July 5) 13.00, Session 4 A (Research Track, Room 1: Auditorium 03),Simple and Efficient Implementation of Pattern Matching in MOLA Tool
Pattern part
. . .
if low : _InterruptingFlow
embproc: EmbeddedSubprocessfrom_object: Object
@from_object: Object
@embproc: EmbeddedSubprocess
@iflow : _InterruptingFlow
@from_object: Object
{Change source of interrupting flow from contained node to embedded subprocess}
_containedObjects_inEmbSubprocess
source
outgoingsource
_containedObjects_inEmbSubprocess
sourceoutgoing
ForEach loop
Loop body
Action (create) part
Loop variable
Rule with Pattern
Demo
Conclusion
● When there is no single standards (for languages, techiques and platforms),only model driven development (MDD) approach with model transformations permits to use all the notations (the most appropriate one for each case).
● For model transformations precise modeling language semantics is necessary.As it was shown with UML AD and BPMN, standards should be adjusted and profiled.
● Metamodel-based generic modeling tools for MDD approach is of high demand, however there is no adequate industry support for that.Therefore development of new generation of metamodel-based and model transformation-ready tool is started at UL IMCS.
Questions and Answers
Recommended