Upload
solomon-w-demissie
View
244
Download
0
Embed Size (px)
Citation preview
7/30/2019 Process Execution and Semantic
1/33
Process Execution andSemantics
7/30/2019 Process Execution and Semantic
2/33
CS752, November 2012 www.hilcoe.com.et 2
Process Mapping and Execution in BPMN 1.X
7/30/2019 Process Execution and Semantic
3/33
CS752, November 2012 www.hilcoe.com.et 3
Process Mapping and Execution in BPMN 2.0
7/30/2019 Process Execution and Semantic
4/33
CS752, November 2012 www.hilcoe.com.et 4
Important features of BPMN 2.0 BPMN 2.0 has a valid Metamodel
A metamodel is a precise definition of theconstructs and rules needed for creatingspecific model
Several benefits associated to metamodel: It formalizes the definition of models and elements
It formalizes the relationship between elements
It enables interoperability A valid metamodel is an ontology
7/30/2019 Process Execution and Semantic
5/33
CS752, November 2012 www.hilcoe.com.et 5
Important features of BPMN 2.0
BPMN metamodel defines all BPMN
entities with all other attributes andrelations
Where entities could be any visual shapeslike, events, activities or gateways or invisiblestructures like web service operations or data
structures
The metamodel enables interchange,interoperability and execution of models
7/30/2019 Process Execution and Semantic
6/33
CS752, November 2012 www.hilcoe.com.et 6
BPMN 2.0 conformance levels
Software compliance or conformance with BPMN 2.0 isachieved, iff, the software fully matches the applicableconformance points specified
Process modeling conformance BPMN process types, BPMN process elements, visual appearance,
structural, attributes, extended and optional elements, visualinterchange
Process execution conformance Execution semantics, import of process diagrams
BPEL Process Execution Conformance
Choreography Modeling conformance BPMN choreography types, BPMN choreography elements, visual
appearance, choreography semantics, visual interchange
7/30/2019 Process Execution and Semantic
7/33
CS752, November 2012 www.hilcoe.com.et 7
BPMN 2.0 Execution Semantics
The purpose of the execution semantics is to describe aclear and precise understanding of the operation of theelements
BPMN execution semantics include: Process instantiation and termination semantics Semantics of different types of activities
Normal, subprocess, loop, multiple instances Semantics of different kinds of gateways
Parallel, event based, exclusive,
Semantics of different kinds of events Start, intermediate, end, event sub-process,
Some elements are non-operational Manual task, abstract task, ad-hoc subprocess,
7/30/2019 Process Execution and Semantic
8/33
CS752, November 2012 www.hilcoe.com.et 8
BPMN 2.0 Execution Semantics
BPMN 2.0 presents an execution semantics that
defines precisely how models in the BPMNnotation should behave when executed in a tool
The execution semantics is defined informally
using natural language
7/30/2019 Process Execution and Semantic
9/33
CS752, November 2012 www.hilcoe.com.et 9
Execution semantics of elements are presented
in the following structure:A description of the operational semantics of theelement
Exception issues for the element where relevant
List of workflow patterns supported by the elementwhere relevant
A process can start as a result of any of thefollowing:
Its start event occurs With event based gateways With receive task
7/30/2019 Process Execution and Semantic
10/33
CS752, November 2012 www.hilcoe.com.et 10
In these circumstances new process instances will becreated and the instantiate flag of the process is set totrue. [a runtime b/r]
For a Process instance to become completed, all tokensin that instance MUST reach an end node, => (1) There is no token remaining within the Process instance,
(2) No Activity of the Process is still active.
* Note also that if a token reaches a Terminate End Event,the entire Process is abnormally terminated
7/30/2019 Process Execution and Semantic
11/33
CS752, November 2012 www.hilcoe.com.et 11
Description of Some BPMN Elements:
FlowElement
Flow nodes: Event Activity
ChoreographyActvity Gateway
SequenceFlow
Some attributes of a FlowElement
Is an abstract super class for all elements that can appear in a Process flow
7/30/2019 Process Execution and Semantic
12/33
CS752, November 2012 www.hilcoe.com.et 12
Class diagram for FlowElement
7/30/2019 Process Execution and Semantic
13/33
CS752, November 2012 www.hilcoe.com.et 13
Activity
Task
SubProcess
CallActivity (Reusable Activity /Global Tasks)
It inherits the attributes and model associations of
FlowElement Some more attributes of Activity element:
Is an abstract super class for all Concrete Activity types
7/30/2019 Process Execution and Semantic
14/33
CS752, November 2012 www.hilcoe.com.et 14
The default value is 1. The value MUST NOT be less than 1. This attribute
defines the number oftokens that MUST arrive before the Activity can
begin. Note that any value for the attribute that is greater than 1 is an
advanced type of modeling and should be used with caution.
startQuantity: integer
= 1
This references the Intermediate Events that are attached to the boundary
of the Activity
boundaryEventRefs:
BoundaryEvent [0..*]
The Sequence Flow that will receive a token when none of the
conditionExpressions on other outgoing Sequence Flows evaluate to true.
The defaultSequence Flow should not have a conditionExpression; any
such Expression SHALL be ignored.
default: SequenceFlow
[0..1]
An Activity MAY be performed once or MAY be repeated. If repeated, theActivity MUST have loopCharacteristics that define the repe-tition criteria
(if the isExecutable attribute of the Process is set to true).
loopCharacteristics:LoopCharac-teristics
[0..1]
A flag that identifies whether this Activity is intended for the purposes ofcompensation. Iffalse, then this Activity executes as a result of normal
execution flow. Iftrue, this Activity is only activated when a
Compensation Event is detected and initiated under Compensation
Event visibility scope (see page 281 for more information on scopes).
isForCompensation:boolean = false
DescriptionAttribute Name
7/30/2019 Process Execution and Semantic
15/33
CS752, November 2012 www.hilcoe.com.et 15
Whathapp
ensInsidea
nActivity?
BPMNA
ctivityL
ifecyclede
scrib
ed
inUM
Lstate
diagram
7/30/2019 Process Execution and Semantic
16/33
CS752, November 2012 www.hilcoe.com.et 16
The Start Quantityattribute of an activity defines thenumber of token required for the activity to be Readyfor execution
The first InputSet where all data inputs are available(by means of data associations) is used to start theexecution of the Activity. If no InputSet is available,then the execution will wait until this condition is met
this InputSet is based on data associations
For tasks that are attached after Event-BasedExclusive Gateways, the first element (Task or Event)that completes causes all other Tasks to be withdrawn
The diagram shows complete conditions faced by anactivity from start to end
7/30/2019 Process Execution and Semantic
17/33
CS752, November 2012 www.hilcoe.com.et 17
If the Activity has no outgoing Sequence Flows,
the Activity will terminate without producing anytokens and termination semantics for thecontainer is then applied
Automated activities are executed by a system,while manual activities are executed by humans(or a system of that capability)
All Activities share common attributes andbehavior such as states and state transitions.
7/30/2019 Process Execution and Semantic
18/33
CS752, November 2012 www.hilcoe.com.et 18
Class diagram for Task
A Task is a Concrete Activity, and has multiple variations
A task has no more attributes than it inherits from the Activity super class; while thevariations have
7/30/2019 Process Execution and Semantic
19/33
CS752, November 2012 www.hilcoe.com.et 19
All about Tasks
Service Task: Upon activation, the data in the inMessageof the Operationis assigned from the data in the Data Inputof the Service Task theOperation is invoked. On completion of the service, the data in the DataOutputof the Service Task is assigned from the data in the outMessageofthe Operation, and the Service Task completes. If the invoked servicereturns a fault, that fault is treated as interrupting error, and the Activity (theService Task) fails
Send Task: Upon activation, the data in the associated Message isassigned from the data in the Data Input of the Send Task. The Message issent and the Send Task completes
Receive Task: Upon activation, the Receive Task begins waiting for theassociated Message. When the Message arrives, the data in the DataOutput of the Receive Task is assigned from the data in the Message, andReceive Task completes. For key-based correlation, only a single receive
for a given CorrelationKey can be active, and thus the Message matches atmost one Process instance. For predicate-based correlation, the Messagecan be passed to multiple Receive Tasks. If the Receive Tasks instantiateattribute is set to true, the Receive Task itself can start a new Processinstance
7/30/2019 Process Execution and Semantic
20/33
CS752, November 2012 www.hilcoe.com.et 20
All about Tasks
User Task: Upon activation, the User Task is distributed to the assignedperson or group of people. When the work has been done, the User Taskcompletes
Manual Task: Upon activation, the manual task is distributed to theassigned person or group of people. When the work has been done, theManual Task completes. This is a conceptual model only; a Manual Task isnever actually executed by an IT system
Business Rule Task: Upon activation, the associated business rule is
called. On completion of the business rule, the Business Rule Taskcompletes
Script Task: Upon activation, the associated script is invoked. Oncompletion of the script, the Script Task completes
Abstract Task: Upon activation, the Abstract Task completes. This is aconceptual model only; an Abstract Task is never actually executed by an ITsystem.
7/30/2019 Process Execution and Semantic
21/33
CS752, November 2012 www.hilcoe.com.et 21
Tasks
7/30/2019 Process Execution and Semantic
22/33
CS752, November 2012 www.hilcoe.com.et 22
Read on the execution semantics of SubProcess, Call Activity, Ad-Hoc Sub-Process, Loop Activity and MultipleInstance Activity
7/30/2019 Process Execution and Semantic
23/33
CS752, November 2012 www.hilcoe.com.et 23
Send task
A task specifically designed to send a Message to an external Participant
7/30/2019 Process Execution and Semantic
24/33
CS752, November 2012 www.hilcoe.com.et 24
Send Task Model Associations
7/30/2019 Process Execution and Semantic
25/33
CS752, November 2012 www.hilcoe.com.et 25
Execution Semantics for Gateway
Example: Parallel Gateway
The Parallel Gateway cannot throw any exceptionException Issues
The Parallel Gateway is activated if there is at least
one token on each incoming Sequence Flow
The Parallel Gateway consumes exactly one token
from each incoming Sequence Flow and producesexactly one token at each outgoing Sequence Flow
If there are excess tokens at an incoming Sequence
Flow, these tokens remain at this Sequence Flow
after execution of the Gateway
Operational
Semantics
7/30/2019 Process Execution and Semantic
26/33
CS752, November 2012 www.hilcoe.com.et 26
Execution Semantics for Events
Start Events For single Start Events, concerned with starting a new Process
instanceeach time the Event occurs. Sequence Flows leaving
the Event are then followed as usual
Intermediate Events The handling consists of waiting for the Event to occur. Waiting
starts when the Intermediate Event is reached Once the Event occurs, it is consumed
End Event
The behavior associated with the Event type is performed
Study all the different variation of events
7/30/2019 Process Execution and Semantic
27/33
CS752, November 2012 www.hilcoe.com.et 27
BPMN to WS-BPEL
Here a mapping of a BPMN model to WS-BPELthat is derived by analyzing the BPMN objectsand the relationships between the objects is
considered
Not all BPMN orchestrationProcesses can bemapped to WS-BPEL in a straight-forward way. One reason being BPMN allows the modeler to draw
almost arbitrary graphs to model control flow
Only sound and well synchronized BPMNOrchestration processes can be directly mappedto WS-BPEL
7/30/2019 Process Execution and Semantic
28/33
CS752, November 2012 www.hilcoe.com.et 28
Two possible, but undesirable states:
Deadlock: when token on some sequenceflow couldnt be removed in known futuretime
Lack of synchronization: when there is morethan one tokenon some Sequence Flow
Q: Please give examples to each of thesescenarios
7/30/2019 Process Execution and Semantic
29/33
CS752, November 2012 www.hilcoe.com.et 29
Directed graphs
The Gateways and the Sequence Flows of the BPMNorchestration Process form a directed graph
A blockof a diagram is a connected sub-graph that isconnected to the rest of the graph only through exactlytwo Sequence Flows:
exactly one Sequence Flow entering the block and exactly oneSequence Flow leaving the block
A block hierarchyfor a Process model is a set of blocks
of the Process model in which each pair of blocks iseither nested or disjoint and which contains the wholeprocess model
7/30/2019 Process Execution and Semantic
30/33
CS752, November 2012 www.hilcoe.com.et 30
Example Block Hierarchy
7/30/2019 Process Execution and Semantic
31/33
CS752, November 2012 www.hilcoe.com.et 31
7/30/2019 Process Execution and Semantic
32/33
CS752, November 2012 www.hilcoe.com.et 32
The mapping process [BPMN Construct] = WS-BPEL Construct
E.g.
[c1]
[T1]
[c2]
[T2]
=
7/30/2019 Process Execution and Semantic
33/33
Continues