Basi di Dati e Sistemi Informativi Progettazione di Basi di Dati Home page del corso: difelice/dbsi
Basi di Dati e Sistemi Informativi su Web 2005-2006 - 12 ...staff.icar.cnr.it/ruffolo/files/Basi di...
Transcript of Basi di Dati e Sistemi Informativi su Web 2005-2006 - 12 ...staff.icar.cnr.it/ruffolo/files/Basi di...
•1
1
Basi di Dati e Sistemi Informativi su Web
Corso di Laurea Specialistica in Ingegneria Informatica
Massimo Ruffolo
E-mail: [email protected]: http://www.icar.cnr.it/ruffolo
Istituto di CAlcolo e Reti ad alte prestazioni del Consiglio Nazionale delle Ricerche (ICAR-CNR)
Exeura s.r.l. – Spin-off dell’Università della Calabria
2
• I workflow– Processi e Workgroup– La definizione– I benefici– Lo standard WfMC– L’approccio
•2
3
Workflow e Workgroup
• Processes are important:– Business Process Reengineering (BPR)– Continuous Process Improvement (CPI)– Business Process Management– Workflow Management (WFM)– Logistics Management (LM)
• There are many modeling techniques and tools– DFD, ISAC, SADT, PN, HLPN, PA, FC, UML, IDEF...– Simulation tools, design tools, CASE tools, WFMS,
...
• Business Process Modeling
4
Business Process Reengineering (BPR)(Business Process Redesign)
• Hammer and Champy: "Reengineering the corporation" (1993)
• Keywords: – fundamental– radical– dramatic– process
• The "organize before automate"-principle is replaced by "process thinking".
Workflow e Workgroup
•3
5
Continuous Process Improvement (CPI)• Instead of of seeking a radical breakthrough,
optimizing the process by continuous, incremental improvements.
• Part of the Total Quality Management (TQM) approach("doing it right the first time", "eliminate waste", ...)
high
low
low high
impa
ct
frequency
BPR
CPI
chaos
stagnation
chan
getime
BPR
BPR
CPI
CPI
CPI
BPR and CPI are both process centric and can be supported by a WFMS.
Workflow e Workgroup
6
• Traditional groupware (e.g., Lotus Notes) is flexible but not process aware.
• Traditional workflow management systems are process aware but also rather restrictive.
• A marriage between groupware and workflow management is not a solution.
• Trade-off between flexibility and support.
• Trade-off between flexibility and performance.
• Interesting approaches:
– case handling
– ad-hoc workflow
– inheritance of behavior
– instance-based languages (e.g., XRL)
Workflow e Workgroup
•4
7
explicitlystructured
implicitlystructured
ad-hocstructured
unstructured
data-driven process-driven
ad-hoc workflow
groupware
productionworkflow
case handling
Workflow e Workgroup
8
ad-hocworkflowgroupware production
workflowcase
handling
low
high
flexibility supp
ort
designeffort
perfo
rman
ce
Workflow e Workgroup
•5
9
humanoriented
systemoriented
groupware
workflow
transactionprocessing
P2P=
PersonTo
Person
A2P=
ApplicationTo
Person
A2A=
ApplicationTo
Application
Workflow e Workgroup
10
• process awareness (WFM)(tasks, routing, roles, ...)
• management instrument (WFM)(measurements, control, ...)
• allocating work to resources (WFM)(scheduling, priorities, ...)
• documents (GW)(imaging, sharing, transport)
• collaboration (GW)(interaction, cooperation, ...)
• systems integration (WFM,GW)(integrating applications, legacy software, ...)
• distribution (WFM,GW)(network, transparency, robustness)
Workflow e Workgroup
•6
11
"L'automazione di una parte o dell'intero processo aziendale dove documenti, informazioni e compiti vengono passati da un partecipante ad un altro per ricevere qualche tipo di azione, seguendo un determinato insieme di regole."
[WfMC]
Accettazionerichieste
Notificaaccettazione
RespingirichiestaRevisione del
supervisore
Aggiornarefondi
Valutazionerequisiti
Valutazionefondi
Accettarerichiesta?
Si
Si
No
No
Definizione
I workflowI workflow
12
• Associazione internazionale No-profit• Fondata nell’Agosto 1993 • Sviluppo e promozione di standard http://aiai.ed.ac.uk/wfmc
– Workflow Glossary– Workflow Reference Model– Standard per l’interfacce di sistemi
I workflowI workflow
La Workflow Management Coalition
•7
13
Tipi di workflowTipi di workflow
* gestisce processi meno rigidi e prevede una relazione tra gli utenti piùvicina a quella della collaborazione tra gruppi di lavoro, di fatto sono un’evoluzione di prodotti di groupware integrati con motori di workflow
Workflow collaborativo
* gestisce attività strutturalmente ben definite e ripetibili, che possono essere specificate attraverso una serie di regole:
•Workflow amministrativo: gestisce il flusso di moduli in formato elettronico (form), integrandolo con sistemi di messaggistica o e-mail. •Workflow di produzione: gestisce i flussi di lavoro fortemente strutturati, definiti da regole e dipendenze ben formalizzate.
Workflow strutturato
* viene realizzato utilizzando sistemi più “leggeri” che lasciano all’utente il compito di eseguire di sua iniziativa passi significativi della procedura ogni volta sia richiesta una modifica dinamica al processo in esecuzione.
Workflow ad hoc
14
I benefici dei workflowI benefici dei workflow
Automazione del processo• Riduzione dei tempi, degli errori, miglioramento della qualità del servizio
offerto• Miglioramento nell’organizzazione, scheduling, controllo e monitoraggio dei
processi
Esecuzione
• Supporto alla comunicazione, all‘analisi e comprensione dei fenomeni legati al ciclo di vita dei processi
• Possibile esecuzione manuale e/o automatica
Monitoraggio del processo• Misura delle performance• Supporto manageriale e decisionale
Analisi del processo• Process/workflow mining
•8
15
processo Attori
applicazioni
Workflow
• Separare processi risorse e applicazioni
• Focalizzare la logica dei processi
• Definire le risorse da assegnare al processo
LL’’approccio dei workflowapproccio dei workflow
• Stabilisce chi deve fare cosa e come• Controlla l’esecuzioneIl workflow
16
• Specifica le attività che sono richieste, l’ordine di esecuzione, le condizioni per la transizione da un’attività ad un’altra (pattern)
• Usualmente è modellato mediante un grafo orientato che definisce le relazionidi precedenza tra le varie attività (modelli graph-oriented), oppure come un insieme di attività e di regole per il passaggio da un’attività all’altra e per lo scheduling delle stesse (object oriented)
A2A2
A1
A4
A3
A5
Alcune attivitàpossono essere a loro volta processipiù complessi
Cosa e Come: Il control Cosa e Come: Il control flowflow
•9
17
Chi deve eseguireuna data attività?
L‘assegnamento WorkWork Items Items →→ AttoreAttore è definito rispetto ai ruoli (in base alle compentenze, alla disponibilità e all‘esperienza)
Funzioni addizionali:- monitoraggio delle deadline e degli alerting- bilanciamento del carico di lavoro
Chi: il Chi: il worklistworklist managementmanagement
18
• La rappresentazione dei workflow– I tre livelli di modellazione (Meto-modello, schema, istanza)– Gli elementi significativi e il metamodello di processo– Esempi di linguaggi: XPDL e BPML
•10
19
I tre livelli di workflowI tre livelli di workflow
Package
Process Data Field
ApplicationPartecipant
Sales ordering process
1. Il metamodello
2. Lo schema
3. Le istanze
20
MetamodelloMetamodello
•11
21
22
Il formalismo graficoIl formalismo grafico
•Processi•Attività•Sottoprocessi•Sincronizzazione di Istanze di attività•Transizioni•Activity Set•Parametri•Applicazioni•Campi Dato•Partecipanti•Vincoli di transizione•Vincoli globali•Condizioni•Eventi•Eccezioni
Gli elementi significativi
•12
23
* E’ il linguaggio definito dalla Workflow Management Coalition (WfMC)
* Ha una struttura a grafo basata su processi e attività (nodi) e transizioni (archi)
* Il routing è regolato dalle specifiche sulle transizioni
* I processi non possono essere innestati, ma ci sono attività di chiamata di sottoprocessi
XML Process Definition Language (XPDL)
Business Process Modeling Language (BPML)
* E’ il linguaggio definito dalla Business Process Management Initiative
I linguaggi standardI linguaggi standard
* Ha una struttura a blocchi analoga a un linguaggio di programmazione basata solo su attività e processi
* Il routing è regolato da specifiche attività che possono gestire anche la ciclicità
* Gestisce esplicitamente schedulazione e istanze
24
Un esempio in XPDLUn esempio in XPDL
A1: Transform DataA2: Check DataA3: Check Order TypeA4: Check Credit SubprocessA5: Check Vendor AccountA6: Raise Alarm
A7: Compose Rejection MessageA8: Enter OrderA9: Compose Acceptance MessageA10: Fill Order SubprocessA11: E-Mail ConfirmationA12: Cataloge Order
Le attività Le etichette
E1: <Completed>E2: <Exception>E3: <Valid Data>E4: <Invalid Data>E5: <PO>
E6: <Credit>E7: <Accept>E8: <Bad Credit>E9: <Accept>E10: <Over Limit>
•13
25
Un esempio in XPDLUn esempio in XPDL
A1: Transform DataA2: Check DataA3: Check Order TypeA4: Check Credit SubprocessA5: Check Vendor AccountA6: Raise Alarm
A7: Compose Rejection MessageA8: Enter OrderA9: Compose Acceptance MessageA10: Fill Order SubprocessA11: E-Mail ConfirmationA12: Cataloge Order
Le attività Le etichette
E1: <Completed>E2: <Exception>E3: <Valid Data>E4: <Invalid Data>E5: <PO>
E6: <Credit>E7: <Accept>E8: <Bad Credit>E9: <Accept>E10: <Over Limit>
<Activity Id="1" Name="Check Data"><Implementation>
<Tool Id="checkData" Type="APPLICATION"><ActualParameters>
<ActualParameter>orderInfo</ActualParameter><ActualParameter>status</ActualParameter>
</ActualParameters></Tool>
</Implementation><TransitionRestrictions>
<TransitionRestriction><Split Type="XOR">
<TransitionRefs><TransitionRef Id="22"/><TransitionRef Id="23"/>
</TransitionRefs></Split>
</TransitionRestriction></TransitionRestrictions><ExtendedAttributes>
<ExtendedAttribute Name="Coordinates"><xyz:Coordinates xpos="183" ypos="389"/>
</ExtendedAttribute></ExtendedAttributes></Activity>
<Application Id="checkData"><FormalParameters>
<FormalParameter Id="orderInfo" Index="1" Mode="IN">
<DataType><DeclaredType Id="Order"/>
</DataType></FormalParameter>
<FormalParameter Id="statusOut" Index="2" Mode="OUT">
<DataType><DeclaredType Id="OrderStatus"/>
</DataType></FormalParameter></FormalParameters></Application>
26
Un esempio in XPDLUn esempio in XPDL
A1: Transform DataA2: Check DataA3: Check Order TypeA4: Check Credit SubprocessA5: Check Vendor AccountA6: Raise Alarm
A7: Compose Rejection MessageA8: Enter OrderA9: Compose Acceptance MessageA10: Fill Order SubprocessA11: E-Mail ConfirmationA12: Cataloge Order
Le attività Le etichette
E1: <Completed>E2: <Exception>E3: <Valid Data>E4: <Invalid Data>E5: <PO>
E6: <Credit>E7: <Accept>E8: <Bad Credit>E9: <Accept>E10: <Over Limit>
<Transition Id="22" From="1" To="12"><Condition>status == "Valid Data"</Condition>
</Transition>
•14
27
Un esempio in XPDLUn esempio in XPDL
A1: Transform DataA2: Check DataA3: Check Order TypeA4: Check Credit SubprocessA5: Check Vendor AccountA6: Raise Alarm
A7: Compose Rejection MessageA8: Enter OrderA9: Compose Acceptance MessageA10: Fill Order SubprocessA11: E-Mail ConfirmationA12: Cataloge Order
Le attività Le etichette
E1: <Completed>E2: <Exception>E3: <Valid Data>E4: <Invalid Data>E5: <PO>
E6: <Credit>E7: <Accept>E8: <Bad Credit>E9: <Accept>E10: <Over Limit>
<Activity Id="10" Name="Check Credit Subprocess"><Implementation>
<SubFlow Id="3" Execution="SYNCHR"><ActualParameters/>
</SubFlow></Implementation><TransitionRestrictions>
<TransitionRestriction><Split Type="XOR">
<TransitionRefs><TransitionRef Id="26"/><TransitionRef Id="31"/>
</TransitionRefs></Split>
</TransitionRestriction></TransitionRestrictions><ExtendedAttributes>
<ExtendedAttribute Name="Coordinates"><xyz:Coordinates xpos="381" ypos="535"/>
</ExtendedAttribute></ExtendedAttributes></Activity>
28
Un esempio in XPDLUn esempio in XPDL
A1: Transform DataA2: Check DataA3: Check Order TypeA4: Check Credit SubprocessA5: Check Vendor AccountA6: Raise Alarm
A7: Compose Rejection MessageA8: Enter OrderA9: Compose Acceptance MessageA10: Fill Order SubprocessA11: E-Mail ConfirmationA12: Cataloge Order
Le attività Le etichette
E1: <Completed>E2: <Exception>E3: <Valid Data>E4: <Invalid Data>E5: <PO>
E6: <Credit>E7: <Accept>E8: <Bad Credit>E9: <Accept>E10: <Over Limit>
<Activity Id="33"><Route/>
<TransitionRestrictions><TransitionRestriction>
<Join Type="AND"/></TransitionRestriction>
</TransitionRestrictions><ExtendedAttributes>
<ExtendedAttribute Name="Coordinates"><xyz:Coordinates xpos="725" ypos="391"/>
</ExtendedAttribute></ExtendedAttributes>
</Activity>
•15
29
Un esempio in XPDLUn esempio in XPDL
A11: Set Credit Info A12: Get Credit Authorization A13: Set Order StatusLe attività
A4: Check Credit Subprocess
A10: Fill Order
A14: Ship OrderA15: BillingA16: Create InvoiceA17: Get Credit InfoA18: Charge Credit CardA19: Create ReceiptA20: Raise AlarmA21: Cancel OrderA22: Email Receipt or Invoice
Le attività
Le etichetteE11: <PO>E12: <Credit>E13: <Notify Exception>E14: <Timeout Exception>
30
Un esempio in XPDLUn esempio in XPDL
A11: Set Credit Info A12: Get Credit Authorization A13: Set Order StatusLe attività
A4: Check Credit Subprocess
A10: Fill Order
A14: Ship OrderA15: BillingA16: Create InvoiceA17: Get Credit InfoA18: Charge Credit CardA19: Create ReceiptA20: Raise AlarmA21: Cancel OrderA22: Email Receipt or Invoice
Le attività
Le etichetteE11: <PO>E12: <Credit>E13: <Notify Exception>E14: <Timeout Exception>
<WorkflowProcess Id="2" Name="FillOrder" AccessLevel="PRIVATE">
<ProcessHeader/><FormalParameters>
…<Participants>
<Participant Id="Shipper"><ParticipantType Type="ROLE"/><Description>Order shipper</Description>
</Participant></Participants>…</WorkflowProcess>
<WorkflowProcess Id="3" Name="CreditCheck" AccessLevel="PRIVATE">
<ProcessHeader/><FormalParameters>
<FormalParameter Id="accountNumber" Index="1" Mode="IN">
<DataType><BasicType Type="INTEGER"/>
</DataType></FormalParameter>
…</FormalParameters>
<DataFields><DataField Id="creditStatus" IsArray="FALSE">
<DataType></DataType><Length>0</Length>
</DataField></DataFields><Participants/><Applications>…</Applications><Activities>…</Activities><Transitions>…</Transitions></WorkflowProcess>
•16
31
Un esempio in BPMLUn esempio in BPML <action name=”receiveOrder” portType=”orderService” operation=”order”>
<input element=”tns:details” property=”tns:orderDetails”/>
<input element=”tns:timeToComplete” property=”tns:timeLimit”/>
<output element=”tns:orderID”>
<source property=”tns:orderID”/>
</output>
<assign property=”tns:orderID” xpath=”func:newIdentifier('tns:orderID')”/>
</action>
<assign name=”statusStarted” property=”status”>
<value>started</value>
</assign>
<call process=”tns:chargeCustomer”>
<output parameter=”tns:details”>
<source property=”tns:details”/>
</output>
</call>
<call process=”tns:shipProduct”>
<output parameter=”tns:details”>
<source property=”tns:details”/>
</output>
</call>
<assign name=”statusComplete” property=”status”>
<value>complete</value>
</assign>
<action name=”notifyComplete” portType=”orderService”operation=”notifyCompletion”>
<output element=”tns:orderID”>
<source property=”tns:orderID”/>
</output>
</action>
32
Un esempio in BPMLUn esempio in BPML
<exception name=”cancelRequest” ><event activity=”receiveCancelRequest”/>
<action name=”receiveCancelRequest”portType=”orderService” operation=”cancelRequest”correlate=”tns:orderID”>
<input element=”tns:orderID” property=”tns:orderID”/></action>
<assign name=”statusCanceled” property=”status”><value>canceled</value>
</assign><compensate process=”tns:activityA tns:activityB”/>
</exception>
•17
33
Un esempio in BPMLUn esempio in BPML
<faults><case code=”tns:timeout”>
<assign property=”status”><value>timeout</value>
</assign><compensate process=”tns:activityA tns:activityB”/>
</case><default>
<assign name=”statusAborted” property=”status”><value>aborted</value>
</assign><action name=”notifyError” portType=”orderService”
operation=”notifyError”><output element=”tns:orderID”>
<source property=”tns:orderID”/></output><output element=”tns:reason”>
<source property=”inst:fault”/></output>
</action><compensate process=”tns:activityA tns:activityB”/>
</default></faults>
34
Un esempio in BPMLUn esempio in BPML
<compensation name=”cancelRequest”><event activity=”receiveCancelRequest”/>
<action name=”receiveCancelRequest”portType=”orderService” operation=”cancelRequest”correlate=”tns:orderID”>
<input element=”tns:orderID” property=”tns:orderID”/</action>
<call process=”tns:receiveReturn”><output parameter=”tns:details”>
<source property=”tns:details”/></output>
</call><compensate process=”tns:chargeCustomer”/><assign name=”statusReturned” property=”status”>
<value>returned</value></assign>
</compensation>
•18
35
• I sistemi di gestione dei workflow– Le architetture– I criteri di valutazione– L’analisi dei prodotti open source
36
“Sistemi capaci di definire, creare e gestire l’esecuzione di workflow attraverso l’uso di software, coinvolgendo uno o piùmotori di workflow, e capaci di interpretare definizioni di processo, interagire con i partecipanti del workflow e invocare l’uso di applicazioni e strumenti dell’information technology."
[WfMc]
Definizione
Workflow Management Workflow Management SystemsSystems
Gestione degli aspetti dinamici
•19
37
Workflow Management System
• A Workflow Management System (abbreviated WFMS) is a technology in which workflow processes are defined, performed, managed, and monitored through the execution of software whose order of events is driven by a process definition.
38
WfMSWfMS: l: l’’architettura concettualearchitettura concettuale
Sist
emi d
i Ges
tione
dei
Wor
kflo
w (W
FMS)
•20
39
SERVER
API
Workflow enactment service
Multiserversynchro
PersistencyLayer
Workflow Engine(s)
WfMSWfMS: l: l’’architettura fisicaarchitettura fisica
ExternalDatabase
Interface 6
CLIENT APPLICATIONS
Interface 5
DEFINITION TOOLS
Interface 2Interface 1
RUNTIME APPLICATIONS ADMIN. & MONITORING TOOLS
OtherServer(s)
Interface 4
Invokedapplications
Interface 3
40
•21
41
Workflow Technology
There are for types of workflow systems:
Production WorkflowAdministrative WorkflowCollaborative WorkflowAd-hoc Workflow
42
Production Workflow
Goals:- Executing large number of repetitious tasks- Optimization of production
Non-stop manner
Typical application- insurance claims processing
Man is required only to manage exceptions(work items that fall outside pre-determined process tolerances)
•22
43
Administrative Workflow
Well defined procedures related today-to-day operations:
- Purchase orders- Travel requests- Etc…
Requirements:- Less performance, more stability- Less productivity, more flexibility
Handles one or two orders of magnitude less instances/hour than the Production Workflow Systems
44
Collaborative Workflow
• Focus: The teams working togethertowards common goals
• The teams can vary fromsmall project-oriented groups to widely dispersed people
with interests in common
• Typical application:Budget preparation and negotiation
•23
45
Ad-Hoc Workflow
Applications where the procedures are not defined in advance and are specific to each case instance, for example:
On-the-fly definition of the steps and deadlinesthat are needed to handle a customer query
Quickly and easily creating and reforming process definitions
Goal: Maximum of flexibility in areas where throughput and security are not major concerns
46
Workflow Application SegmentsTrade Press Classification
Low valueprocesses
HighValueBusinessprocesses
Production Collaborative
Administrative Ad Hoc
Loan OriginationInsurance claims
Accounting
Tech doc creation
Expense reportsPurchase approvals
Budgeting
“ Transaction workflow” “Process management”
“ E - Forms” “Groupware”
FYI Routing
Review and Approve
Product brand mgmt.Software development
Repetitive process
Uniqueprocesses
Source: BIS Strategic Decisions
•24
47
WfMSWfMS: l: l’’architettura fisicaarchitettura fisica
* Interpreta la definizione del processo
* Controlla le istanze del processo
* Naviga tra le attività del processo(parallelismo, sequenzialità, cicli, condizioni, dati, deadlines)
* Chiama applicazioni esterne
* Controlla, amministra e verifica gli obiettivi
Il motore di workflow
Le client application
* Interagiscono con un worklist handler per la gestione delle risorse
Le invoked application
* Abilitano il motore di workflow a intraprendere una particolare attività,in genere priva di interfaccia utente
48
* Multipiattaforma
* Multidatabase
* Supporto tecnologia web
* Supporto agli standard
* Tool di modellazione
Requisiti funzionali
Soluzioni implementative
* Sistemi basati su database relazionali
* Scalabilità
* Sicurezza
* Gestibilità
* Robustezza
* Diffusione e documentazione
* Strumenti di sviluppo applicazioni
* Disponibilità API
* Disponibilità interfacce presentazione
* Supporto protocolli comunicazione
* Sistemi basati su messaggistica o e-mail
WfMSWfMS: criteri di analisi: criteri di analisi
•25
49
Workflow Patterns
• A process requires the activation of multiple tasks.• Refers to the relationship among the tasks of a process. • The workflow description languages and the mechanisms to control
the enactment of a case must have provisions to support these temporal relationships.
• In the last decade more than 200 workflow management systems have become available.
• Despite the efforts of the Workflow Management Coalition (WfMC) a good standard for workflow design is missing.
• Available systems are really different with respect of basic workflow functionality.
• Selection processes typically do not address these differences.
• Thus far more than 30 patterns have been collected.• Moreover, the patterns give insight into the basic constructs in
operational processes and are a means to characterize processes and to train designes.
50
Categories of patterns
• Basic Control Flow Patterns • Advanced Branching and Synchronization Patterns • Structural Patterns • Patterns involving Multiple Instances • State-based Patterns • Cancellation Patterns
•26
51
Basic Control Flow Patterns
• Pattern 1 (Sequence)• Pattern 2 (Parallel Split)• Pattern 3 (Synchronization)• Pattern 4 (Exclusive Choice)• Pattern 5 (Simple Merge)
52
Pattern 1 (Sequence) Description An activity in a workflow process is enabled after the completion of another activity in the same process. Synonyms Sequential routing, serial routing.
A B
•27
53
Pattern 2 (Parallel Split) Description A point in the workflow process where a single thread of control splits into multiple threads of control which can be executed in parallel, thus allowing activities to be executed simultaneously or in any order. Synonyms AND-split, parallel routing, fork.
A
B
C
AND
54
Pattern 3 (Synchronization) Description A point in the workflow process where multiple parallel subprocesses/activities converge into one single thread of control, thus synchronizing multiple threads. It is an assumption of this pattern that each incoming branch of a synchronizer is executed only once. Synonyms AND-join, rendezvous, synchronizer.
D
B
C
AND
•28
55
Pattern 4 (Exclusive Choice) Description A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. Synonyms XOR-split, conditional routing, switch, decision.
A
B
C
XOR
56
Pattern 5 (Simple Merge) Description A point in the workflow process where two or more alternative branches come together without synchronization. It is an assumption of this pattern that none of the alternative branches is ever executed in parallel. Synonyms XOR-join, asynchronous join, merge.
D
B
C
XOR
•29
57
Advanced Branching and Synchronization Patterns
• Pattern 6 (Multi-choice)• Pattern 7 (Synchronizing Merge)• Pattern 8 (Multi-merge)• Pattern 9 (Discriminator)
58
Pattern 6 (Multi-choice) Description A point in the workflow process where, based on a decision or workflow control data, a number of branches are chosen. Synonyms Conditional routing, selection, OR-split.
A
B C
x<5 y>7
•30
59
A
B C
y>7
AND
XOR
y<=7
x>=5
A
x>=5 & y<=7
B
XOR
B C
AND
x<5 & y>7
x<5 & y<=7
x>=5 & y>7
CXOR
60
Pattern 7 (Synchronizing Merge) Description A point in the workflow process where multiple paths converge into one single thread. If more than one path is taken, synchronization of the active threads needs to take place. If only one path is taken, the alternative branches should reconverge without synchronization. It is an assumption of this pattern that a branch that has already been activated, cannot be activated again while the merge is still waiting for other branches to complete. Synonyms Synchronizing join.
A
B
C
D???OR
•31
61
Pattern 8 (Multi-merge) Description A point in a workflow process where two or more branches reconverge without synchronization. If more than one branch gets activated, possibly concurrently, the activity following the merge is started for every activation of every incoming branch.
A
B
C
D???AND
62
A
B C
AND
DE
Merge
A
B C
AND
D
E
D
E
•32
63
Pattern 9 (Discriminator) Description The discriminator is a point in a workflow process that waits for one of the incoming branches to complete before activating the subsequent activity. From that moment on it waits for all remaining branches to complete and “ignores” them. Once all incoming branches have been triggered, it resets itself so that it can be triggered again (which is important otherwise it could not really be used in the context of a loop).
review1 review2
XOR XOR
Disc.AND
rejectaccept
64
Structural Patterns
• Pattern 10 (Arbitrary Cycles)• Pattern 11 (Implicit Termination)
•33
65
Pattern 10 (Arbitrary Cycles) Description A point in a workflow process where one or more activities can be done repeatedly. Synonyms Loop, iteration, cycle.
66
Pattern 11 (Implicit Termination) Description A given subprocess should be terminated when there is nothing else to be done. In other words, there are no active activities in the workflow and no other activity can be made active (and at the same time the workflow is not in deadlock).
•34
67
Patterns involving Multiple Instances
• Pattern 12 (Multiple Instances Without Synchronization)• Pattern 13 (Multiple Instances With a Priori Design Time Knowledge)• Pattern 14 (Multiple Instances With a Priori Runtime Knowledge)• Pattern 15 (Multiple Instances Without a Priori Runtime Knowledge)
68
Pattern 12 (Multiple Instances Without Synchronization) Description Within the context of a single case (i.e., workflow instance) multiple instances of an activity can be created, i.e., there is a facility to spawn off new threads of control. Each of these threads of control is independent of other threads. Moreover, there is no need to synchronize these threads. Synonyms Multi threading without synchronization, Spawn off facility
Merge
B
C
XOR
E
More instances neededNo more instances needed
AND
Task C: Determineif more instances of Bare needed
•35
69
Pattern 13 (Multiple Instances With a Priori Design Time Knowledge) Description For one process instance an activity is enabled multiple times. The number of instances of a given activity for a given process instance is known at design time. Once all instances are completed some other activity needs to be started.
70
Pattern 14 (Multiple Instances With a Priori Runtime Knowledge) Description For one case an activity is enabled multiple times. The number of instances of a given activity for a given case varies and may depend on characteristics of the case or availability of resources, but is known at some stage during runtime, before the instances of that activity have to be created. Once all instances are completed some other activity needs to be started.
•36
71
Pattern 15 (Multiple Instances Without a Priori Runtime Knowledge) Description For one case an activity is enabled multiple times. The number of instances of a given activity for a given case is not known during design time, nor is it known at any stage during runtime, before the instances of that activity have to be created. Once all instances are completed some other activity needs to be started. The difference with Pattern 14 is that even while some of the instances are being executed or already completed, new ones can be created.
72
State-based Patterns
• Pattern 16 (Deferred Choice)• Pattern 17 (Interleaved Parallel Routing) • Pattern 18 (Milestone)
•37
73
Pattern 16 (Deferred Choice) Description A point in the workflow process where one of several branches is chosen. In contrast to the XOR-split, the choice is not made explicitly (e.g. based on data or a decision) but several alternatives are offered to the environment. However, in contrast to the AND-split, only one of the alternatives is executed. This means that once the environment activates one of the branches the other alternative branches are withdrawn. It is important to note that the choice is delayed until the processing in one of the alternative branches is actually started, i.e. the moment of choice is as late as possible. Synonyms External choice, implicit choice, deferred XOR-split.
74
c1
implicit XORsplit
B
C
c5
c6
D c7A c2
Workflow A
c1
c3 CB
explicit XORsplit
B
Cc4
c5
c6
D c7
CC
A c2
Workflow B
•38
75
A
B C
AND
D
Merge
A
cancel
cancel
Workflow A Workflow B
XOR
E
D
Merge
B C
76
Pattern 17 (Interleaved Parallel Routing) Description A set of activities is executed in an arbitrary order: Each activity in the set is executed, the order is decided at run-time, and no two activities are executed at the same moment (i.e. no two activities are active for the same workflow
instance at the same time). Synonyms Unordered sequence.
c1
c2
c3
A
B
c5
c7
c8
mutualexclusion
place
c5
mutex
AND-split AND-join
Cc4
c6
•39
77
Pattern 18 (Milestone) Description The enabling of an activity depends on the case being in a specified state, i.e. the activity is only enabled if a certain milestone has been reached which did not expire yet. Synonyms Test arc, deadline, state condition, withdraw message.
B m C
A
... ...
......
milestone
78
c2
register
c3
c4 c5
sendquestionnaire
time out
processquestionnaire
c6
processingneeded
evaluate
skip
c7
c9
c8
c10
c11
processcomplaint
archive
OK
NOK checkprocessing
c1
milestone
•40
79
Cancellation Patterns
• Pattern 19 (Cancel Activity) • Pattern 20 (Cancel Case)
80
Pattern 19 (Cancel Activity) Description An enabled activity is disabled, i.e. a thread waiting for the execution of an activity is removed. Synonyms Withdraw activity.
•41
81
Pattern 20 (Cancel Case) Description A case, i.e. workflow instance, is removed completely (i.e., even if parts of the process are instantiated multiple times, all descendants are removed).
82
Other patterns
• Transactional patterns– Groups of tasks commits/aborts– Dependencies other than Complete-Release
• Case-handling patterns– Data dependencies– Redo/skip roles
• Inter-workflow patterns• Resource allocation patterns• Etc.