knowledge modelling and management part b (8)jessicac/project/kmm/slides 2011... · 4 introducing...

Post on 16-Aug-2018

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Knowledge Modelling and Knowledge Modelling and ManagementManagement

Part B (8)Part B (8)

YunYun--Heh ChenHeh Chen--BurgerBurgerhttp://www.aiai.ed.ac.uk/~jessicac/project/KMMhttp://www.aiai.ed.ac.uk/~jessicac/project/KMM

2

An Example Semantic Web An Example Semantic Web Business Process ModellingBusiness Process Modelling

Language Language

3

Introducing BPMLIntroducing BPMLA web based business process

modelling language

4

Introducing BPMLIntroducing BPMLWhat is the full name ?

– Business Process Modelling Language.Who developed it ?

– Assaf Arkin, Intalio, Nov 13, 2002. Main characteristics:

– A semantic web version of a business process modelling language;

– Closer to software engineering/implementation level of details;

– Suitable to support software execution directly. – Relative comprehensive in covering process relative

conceptsReference Web Site:

– BPML: http://www.bpmi.org. – Why BPML? by John Hamilton, Senior Architect, Process Infrastructure:

http://www.ebizq.net/hot_topics/bpm/features/4068.html. (not examable)

5

Main ConceptsMain Concepts

Activity, Process ContextActivity Set Activity Instance and States Activity:

– Simple activity– Complex activity – hierarchical

» process Nested processException process Compensation process

6

BPML Activity Ontology BPML Activity Ontology

RedundantRelationships

Definition

AmbiguousColour Code

AmbiguousHierarchyNotation

Naming style:activity, process

7

BPML Activity OntologyBPML Activity Ontology

8

Simple ActivitiesSimple ActivitiesA simple activity can not be further decomposed.Operational:– Action: performs or invokes a single operation involving

exchange of input/output messages– Assign: assigns a new value to a property– Empty: no actionInvoke and control:– Call: instantiates a process and waits for its completion – Spawn: instantiates a process without waiting for its completionControl:– Delay: specify time delay (before moving on) – Fault: throws a fault in the current context– Compensate: invokes compensation for named process– Raise: raises a signal– Synch: waits to synchronise with (catch) a raised signal and then

discard it

9

Complex ActivitiesComplex ActivitiesA complex activity is composed of other activities and may direct their execution.Sequential/Parallel execution:

– Sequence: sequential execution– All: parallel execution

Branching:– Choice: exclusive-or based on events (e.g. certain activities

being activated based upon receiving an external message of the context)

– Switch: exclusive-or based on the (truth) value of conditionsLooping:

– Foreach: executes the activity set (sequentially) once for each item in the item list

– Until: execution until a condition is true– While: execution while a condition is true

10

Types of ProcessTypes of Process

Nested process.Exception process.Compensation process.A process definition includes:

– name, documentation, identity, persistent, event, parameters, activity set, compensation (p24).

11

Activity ContextActivity Context

An activity context defines an environment for the execution of related activitiesA process definition includes one context definition that is shared by all activities that execute as part of that process – this is also called the process context Activity contexts may be hierarchical, since processes may be nestedA context has the concept of encapsulation and some capabilities of inheritance, e.g. a child context shares properties of its parents; but not vice versa, or with its siblingsA context definition includes:

– Atomic process, exception process, nested process, properties, schedule, signals and faults

12

Communication Methods Communication Methods between processesbetween processes

Call/spawn: a process may call or spawn other processes that are within the same context or other similar contexts (not defined what are the similar contexts)Messages: one process may pass messages to other processes that may or may not be in the same activity contextSignals: a process may raise signals (stored in a variable) within the same context; these signals may be captured (sync) by other processes within the same context

13

Signals and SynchronisationSignals and Synchronisation

Raise activity – raise a signal.Synch activity – synchronize on a signal.Used to control temporal dependency between different processes.Used for coordination of processes within the same context only.

14

Activity Instance and States

Ready: no actionActive: process instance is instated and executed.Completing: all executing activities are finished, and get ready

to complete.Aborting: perform to abort the activity instanceNote: Cancelled is a state of an activity instance, but it is not recorded, as a cancelled activity is discarded, not stored.

Start status

15

Exception HandlingException HandlingException processes handles exceptions and are a type of nested processes. Can only be instantiated once. Can only be instantiated when the parent process is in the active state. May be invoked by an input message, raised signals, or due to activities failed to complete. When instantiated, the parent process transits to the aborting state and its other nested processed terminates(those cannot terminate may abort); after all activities are terminated or aborted, the exception process is carried out. This ensures that only one exception process is carried out in one process context. When an exception process is finished, its parent process is transit to an aborted state. An exception process may abort and throw a fault in the context; when this happens a fault handler is invoked and executed.

16

Fault HandlerFault HandlerA fault indicates an erroneous condition that prevents an activity form completing successfully or from recovering from another fault.When a fault is thrown in a context, the parent activity transits to the aborting state and terminates (or abort) all child activities; once all activities in the context are terminated (or aborted), a fault handler is executed. If activities in a fault handler executes successfully, the parent activity aborts; if any of those activities throws a fault, the parent activity aborts with the same fault. The detection and handling of exceptions and faults are described and operated within a process/context. Discussion of this approach:

– Adv: fault handling is local therefore it is more likely to provide good solutions for problem, and is also easier to monitor and keep track.

– Disadv: (1) may lose sight of overall strategies; similar faults may be handled inconsistently; (2) even when there is an overall strategy, inconsistent handling may still be difficult to spot; (3) it may also be tricky to detect and repair cross process/context faults, as all exception/fault handlings are local to a context.

17

Compensation ProcessCompensation ProcessWhen a process encountered an exceptional condition that prevents it from completing that it should back-track (undo) from what it has done before aborting. A compensation process is a process defined as a part of a parent process for the purpose of reverting the affects of the parent process. A compensation process is often used in fault handlers to compensate for processes that have completed before the parent activity was asked to abort. A compensation process can only be invoked after the parent process is completed, if the parent process fails to complete, it should use fault handlers to recover and back-track. A process has only one compensation process.A process can only invoke it once.A fault handler may invoke necessary compensation processes of any process.

18

Exception Handling ScenarioException Handling Scenario

ProcessEncountered

An Exception

InvokeAn

ExceptionProcess

TerminateAll

Childactivities

ExecuteException

process

AChild

ActivityMay be

Cancelled,CompletedOr aborted

message

signal

failed completion

An activeactivity may

throw a terminate fault

that finally reachan aborted state

ExceptionProcess may

Throw afault

Change processStatus to Aborted

Change Process status

To Aborting

InvokeFault

Handler, inc.Compensation

handling

FaultHandler

MayThrowA fault

…XOR links

exe. successfully

exe. successfullyexe. failed

exe. failed

19

BPML by ExamplesBPML by Examples

20

Activity Set definitionActivity Set definition

21

Context DefinitionContext Definition

22

Process DefinitionProcess Definition

(And output parameters)

23

Example ModelExample Model

24

XML RepresentationXML Representation

Use signals to control temporal dependency

25

Process Process exampleexample

22

26

Process Process exampleexample part 1part 1

27

Process Process exampleexample part 2part 2

28

Process Process exampleexample part 3part 3

29

Process Process exampleexample

part 4part 4

30

Summary: BPMLSummary: BPMLSuitable to operate in a distributed environmentA BPML PM is described in XMLDistinguishes different process types Has the concept of “hierarchical contexts” vs. “hierarchical processes”Defines process instance states explicitly and use them to define process behavioursMay use URI to identify processesGives explicit representation and handling of synchronisation, exception and fault handling and recovery Uses and assumed use of other standards and languages as a part of the language, e.g. Xpath, WSDL, XML Schema, Does not have a visual languageDoes not have formal semantic Does not provide modelling guidelines, or abundant modelling examplesDoes not have a data model

31

Mapping BPML process types to IDEF3 processes

32

Modelling PrimitivesModelling Primitives IDEF3 vs. BPMLIDEF3 vs. BPML

IDEF3:– And-split, or-split, xor-split – And-join, or-join, xor-join – Sequence and looping are indicated using temporal

links

BPML: – Sequence– All– Choice– Switch– Forall– Until– While

33

Mapping Modelling PrimitivesMapping Modelling Primitives IDEF3 vs. BPMLIDEF3 vs. BPML

IDEF3:– And-split, or-split, xor-split – And-join, or-join, xor-join – Sequence and looping are indicated using temporal

linksBPML:

– Sequence– All– Choice (by event)– Switch (by conditions)– Forall– Until– While

34

Example IDEF3 ModelExample IDEF3 Model

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

35

Level 1 Sequence:

BPML Model Diagram 1

A All BC Switch DEFGH I1.2 1.3

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML -- 1 1

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1

1.21.3

36

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1.2

B

C

Level 1.2 All BC:

BPML Model Diagram 2

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML –– 2 2

37

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1.3

1.3.1

1.3.2

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML –– 33

Level 1.3 Switch DEFGH :

BPML Model Diagram 3

Sequence DEG1.3.1

Sequence FH1.3.2

38

Level 1.3.1 Sequence DEG:

Switch DE G

BPML Model Diagram 4

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1.3.1

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML –– 44

39

Level 1.3.1.1 Switch DE:

D

E

BPML Model Diagram 5

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML –– 55

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1.3.1.11.3.1

40

Level 1.3.2 Sequence FH:

F H

BPML Model Diagram 6

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1.3.2

1.3.1

Mapping an IDEF3 process to BPML Mapping an IDEF3 process to BPML –– 66

41

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

1

1.21.3

1.3.1

1.3.2

1.3.1.1

Summary of Mapping and BPML Model

A 1.2 1.3 I

1.3.1

1.3.2

Level 1.3.2 Sequence: F H

Level 1 sequence:

Level 1.2 All:

Level 1.3 Switch:

Level 1.3.1 Sequence: 1.3.1.1 G

Level 1.3.1.1 Switch:D

E

B

C

42

Representing a BPML Model

A 1.2 1.3 I

1.3.1

1.3.2

Level 1.3.2 Sequence: F H

Level 1 sequence:

Level 1.2 All:

Level 1.3 Switch:

Level 1.3.1 Sequence: 1.3.1.1 G

Level 1.3.1.1 Switch:D

E

B

C

Process(ID, Type, Sub-processes).

Process(1, sequence, [a, process(1.2), process(1.3), i]).Process(1.2, all, [b, c]).Process(1.3, switch, [process(1.3.1), process(1.3.2)] ).Process(1.3.2, sequence, [f, h]). Process(1.3.1, sequence, [process(1.3.1.1), g]).Process(1.3.1.1, switch, [d, e]).

43

Summary: Decomposition OverviewSummary: Decomposition Overview

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

AB

C

D

E

F

G

H

I

& XOR XOR&

XOR

44

Brief Comparison and SummaryBrief Comparison and Summary

The OR-split junction is not included in BPML, but must be broken down into AND- and XOR-split junctions via hierarchical views.BPML does not have the notion of join junctions. IDEF3 is more expressive in operational logic that is arguably more intuitive visually.BPML is more explicit in its functional definitions that it is easier for (procedural) programming and control.To successfully implement an IDEF3 model, logic based system is suitable.To successfully implement a BPML model, (OO) programming based system is suitable.Those two modelling languages are complimentary and compatible that they may be used together: one for the logic layer and one for the implementation layer.

45

ReferencesReferences

[7] BPML: – See the local reading list directory, or– http://xml.coverpages.org/ni2003-08-29-

a.html

[7] BPML: – See the local reading list directory, or

[7] BPML: – See the local reading list directory, or

top related