Диссертация (1137084), страница 23
Текст из файла (страница 23)
End events are events without any outgoing sequence flows. All events are shown as circles. End events arerepresented by circles with bold borders. Cancellation events are marked with an additional “x”sign.A marking of a BPMN model denotes a current state of a process instance. It is a multiset overthe set of sequence flows, denoted as m ∶ SF → N. I.e., each sequence flow may contain tokens ornot. A token in some sequence flow shows, that the source activity (or gateway) of this sequenceflow is already fired, whereas the target activity (gateway) may fire, if all other incoming flows forit also carry tokens. A marking shows a snapshot of the process instance execution at a particularmoment in time.
An initial marking is a marking such that ( ) = 1, if is an outgoing sequenceflow of , ( ) = 0 otherwise. The final marking is a marking such that ∀sf ∈ SF ∶ m(sf ) = 0 .Each node may be enabled, then an enabled node may fire.An activity is depicted as a rounded rectangle and denotes some visible action, which occursin a business process. The fragment shown in Figure 3.12 contains two activities Calculate Costand Send Proposal. The first activity is performed in all process instances, whereas the branchwith the latter one can be cancelled. An activity ∈ is said to be in enabled state in marking if at least one of its incoming sequence flows holds at least one token. An enabled activity mayfire.
When activity fires it consumes one token from an incoming sequence flow and produces atoken for each outgoing not exceptional sequence flow.Gateways of two types (parallel and exclusive) are needed to redirect control flow duringprocess runs. Exclusive gateways (shown as diamonds with an “x” sign) merge alternative paths:incoming sequence flow token is routed to one of the outgoing sequence flows. A parallel gateway(modelled as a diamond with a “+” sign) is enabled if each incoming sequence flow contains at leastone token. An enabled parallel gateway may fire, consuming a token from each incoming sequenceflow and producing a token to each outgoing sequence flow. A reader can see an exclusive gatewayin Figure 3.12.98An end event is enabled if one of its incoming sequence flows contains a token.
When anordinary end event fires, it consumes a token from an incoming sequence flow, while a cancellationend event consumes all the existing tokens, yielding an empty marking.Process resources are modelled with lanes. A reader can see in Figure 3.11, that the processof the architecture team is performed by two following roles: Analyst and Architect. The lanesare separated with a solid line and placed in a single BPMN pool.Hierarchical BPMN ModelsBPMN supports hierarchy, i.e., a process can contain sub-processes. Sub-processes can bepresented as base BPMN models.Figure 3.13 shows a fragment of the architectural changes process model (see Figure 3.11)with sub-process Calculate Cost. Sub-process is an expanded activity of the base model, whichcontains a nested model.
Firstly, the atomic activity Calculate Cost is performed. After itscompletion either the prepared proposal is sent to the Customer, or the proposal is cancelled.Note that a sub-process can be either finished successfully by reaching an end event, or cancelled.The choice is made by the exclusive gateway. This situation is modelled using a cancellation event.The outgoing exceptional flow is marked with a boundary intermediate cancellation event.Figure 3.13: Fragment with a sub-processLet us introduce a formal definition of a hierarchical model [7, 167].Definition 14.
A hierarchical BPMN model is a tupleBPMNℎ = (BPMNmodels , BPMNroot , , ref, cancel), in that– a set BPMNmodels = {BPMN1 ,...,BPMN } is the set of base BPMN models8 ,– a tree relation ⊆ BPMNmodels / {BPMNroot }×BPMNmodels specifies a parent for each BPMNmodel, where BPMNroot is a root of this tree,8Let = 1 ∪ ... ∪ , EF = EF1 ∪ ... ∪ EF , and cancel = cancel1 ∪ ... ∪ cancel , where 1 ,..., , EF1 ,...,EF , and cancel1 ,..., cancel are sets of activities, exceptional flows, and cancellation events of base modelsBPMN1 ,...,BPMN respectively.99– a partial function ref ∶ ↛ BPMNmodels / {BPMNroot } specifies the link between activities ina parent model and child models, such that (BPMNchild ,BPMNparent ) ∈ iff ∃ ∈ parent ∶ref() = BPMNchild , where parent is a set of BPMNparent activities, there is an activity foreach child model,– a bijective function cancel ∶ cancel → EF maps cancellation end events of BPMNchild toexceptional sequence flows of BPMNparent for each pair (BPMNchild , BPMNparent ) ∈ .Consider a hierarchical BPMN model BPMNℎ = (BPMNmodels ,BPMNroot ,,ref,cancel).
We saythat activities, for which ref function is not defined, are atomic activities. All other activities arenon-atomic. A set of nested process models for a model BPMNparent ∈ BPMNmodels is defined as{BPMNnested ∈ BPMNmodels ⋃︀(BPMNnested ,BPMNparent ) ∈ ∗ }, where ∗ is a transitive closure of.Suppose that start is a start event of model BPMNroot .
Then an initial marking of BPMNℎis defined as follows: ∀sf ∈ SF ∶ (sf) = 1, if sf is an outgoing sequence flow of start , and (sf) = 0,otherwise.Firing rules of hierarchical BPMN models extend the firing rules of base BPMN models in a partof enabling and firing non-atomic activities. Suppose that is a non-atomic activity of a base modelBPMNparent ∈ BPMNmodels , then exists BPMNchild ∈ BPMNmodels , such that ref() = BPMNchild .Activity can fire if and only if BPMNchild and its nested models do not contain any tokens.When activity fires it consumes a token from an incoming sequence flow and produces tokensto outgoing sequence flows of BPMNchild start event.If BPMNchild reaches the final marking, and a cancellation end event of BPMNchild is the causeof termination, then a token will be added to ef — an exceptional sequence flow of BPMNparent ,such that cancel() = ef, and all the tokens will be removed from sequence flows of nested models.Otherwise, if BPMNchild and its nested models reach the final markings, then tokens will be addedto outgoing not exceptional sequence flows of .The BPMN notation contains a wide range of event constructs, the semantics of which involvescancellation.
These could be error, signal, cancel, and other types of events. In this section, wecombine all of them together conceptually as one type called cancel events.BPMN Models with DataWe deal with BPMN models enriched with data objects and data associations. Figure 3.14shows a fragment of architectural changes process model (see Figure 3.11) with the data objectCost. Data associations are shown as dashed arrows.The model contains an explicit choice between acceptance and rejection of an architecturalchanges proposal, prepared by the architecture team as a result of analysis of customer’s needs.Then it was received by the customer (an activity Receive Proposal in Figure 3.14). The choiceis made in an exclusive gateway, basing on the results of the analysis performed earlier.
Theseresults stored in data object Cost shown with a symbolic sheet of paper. It has two following100Figure 3.14: Fragment with a data objectdata associations: write association with activity Receive Proposal and read association withthe exclusive gateway. Thus, the cost of received proposal is defined as a value of the data objectafter the firing of Receive Proposal activity. If cost is not appropriate, the gateway activates theReject Proposal branch.
In other case, the process proceeds with the Accept Proposal activity.Definition 15. A BPMN model with data is a tupleBPMN = (BPMNℎ , DO, DA, , SF , default, ), in that– a set BPMNℎ is a hierarchical BPMN model, where BPMNmodels = {BPMN1 ,...,BPMN } isthe set of base BPMN models9 ,– a set DO = {do1 ,...,do } is the set of data objects,– a set DA ⊆ ( × DO) ∪ (DO × ) ∪ (DO × XOR ) is the set of data associations,– a function ∶ → (( → Val ) → ( → Val )) specifies how activities change the valuesof data objects,– a function SF ∶ SF ′ → (( → Val ) → {, }) where SF ′ = {(,) ∈ SF ′ ⋃︀ ∈XOR , ∈ } defines conditional branching,– a function default ∶ XOR → SF specifies a default outgoing sequence flow sf ∈ SF for eachexclusive gateway XOR ∈ XOR ,– a function ∶ DO → Attr maps each data object to its name.A marking of a BPMN model with data is defined as a pair (, ), in which ∶ SF → N is amarking of hierarchical model BPMNℎ , and ∶ DO → Val presents values of data objects.BPMN models with data extend firing rules of hierarchical BPMN models [167].