65b044d4aa28ebdc70a52aff4f265fb2.ppt
- Количество слайдов: 32
Contracts, Workflows, and Beyond. . . Christian Stefansen IT University of Copenhagen, December 5, 2006 ITU, Dec. 5, 2006
The NEXT Research Group • NEXT generation Enterprise Resource Planning (ERP) systems • ”The over-all goal of the project is to develop software technology and methods for development of the next generation of [. . . ] ERP-systems. ” • Microsoft Dynamics is the former Navision/Damgaard plus Great Plains etc. ITU, Dec. 5, 2006 2
Compositional Commercial Contracts Jesper Andersen Ebbe Elsborg Fritz Henglein Jakob Grue Simonsen Christian Stefansen ITU, Dec. 5, 2006
Paper-Based Contract-Handling is Costly • No formal representation results in: • • • Manual handling in auxiliary systems Ad hoc deadline management Ambiguous semantics Time-consuming valuation Cannot report on future events No coordination with production planning or supplychain management • Missed opportunities (call options etc. ) • Potential benefits of formal representation: • Alleviate the problems above • Several consistency checks at time of writing contract • (Semi-)automated contract analysis (incl. valuation) (DSL programs are in a sense ”intelligent data”) ITU, Dec. 5, 2006 4
Example: Agreement to Provide Legal Services • Section 1. The attorney shall provide, on a non-exclusive basis, legal services up to (n) hours per month, and furthermore provide services in excess of (n) hours upon agreement. • Section 2. In consideration hereof, the company shall pay a monthly fee of (amount in dollars) before the 8 th day of the following month and (rate) per hour for any services in excess of (n) hours 40 days after the receival of an invoice. • Section 3. This contract is valid 1/1 -12/31, 2008. ITU, Dec. 5, 2006 5
Example: Legal Agreement Code ITU, Dec. 5, 2006 6
We Analyzed and Wrote 15 Full-Length Contracts Data • • Agents Resources (goods, services, rights) Commitments/Events Time ITU, Dec. 5, 2006 Structure • • Sequential execution Concurrent execution Repeated execution Alternative execution (choice between subcontracts) 7
Syntax *** ITU, Dec. 5, 2006 8
Deterministic Reduction with Delayed Matching • Consider some of the reduction rules: ITU, Dec. 5, 2006 9
Example Reduction ITU, Dec. 5, 2006 10
Example Reduction - Step 2 ITU, Dec. 5, 2006 11
Expressing Workflows in a Process Calculus Work in progress. . . ITU, Dec. 5, 2006
Why Formal Workflows? • Users • • • Designers/planners • • • can easily adhere to established best practice know what tasks kan be dealt with now/later receive help to delegate tasks appropriately need only local knowledge about the tasks they solve (as opposed to global knowledge about the entire workflow) can can more easily map out and change processes introduce structure along the way (ad hoc) performal analysis on workflows partially automate outsourcing etc. Controllers • • ITU, Dec. 5, 2006 gain finer registration of resource consumption (e. g. time) and thus costs (get Activity-Based Costing for free) can carry out performance analysis more easily 13
How not to design one’s processes. . . Book flight Get permission to travel Book hotel Reserve car • See any problems? • Too rigid • Design (consultants/ users) Recv. confirmation File expenses for reimbursem. Omissions/errors/simplifications • Recv. ticket Requires many programmer hours (Do we always get permission first before booking? ) Recv. reimbursement (What if we do not receive the ticket? ) (Write everything in BPEL! But who is skilled to change it then? ) ITU, Dec. 5, 2006 14
. . . but this is Taylor’s Scientific Management all over again! • Workflows can be as freeform or as rigid as one designs them. Runtime allocation optimization is key! • The simplest workflow is just an unordered task list. • Workflow can be adaptive, starting with the completely unstructured workflow first and imposing structured constraints over time. ITU, Dec. 5, 2006 15
Helping Yourself: An Improved Model Design (consultants/ users) Automated process analysis max . . . s. t. . ! ? Book flight Recv. ticket Book hotel Reserve car Recv. confirmation Process mining ITU, Dec. 5, 2006 Optimal runtime allocation Recv. confirmation Get permission to travel File expenses for reimbursem. Recv. reimbursement Auditing, reporting, outsourcing 16
Is There a Standard for Workflows? • No widely accepted standard so far. • Studies by Aalst et al. proposed: Focus • 20/43 control-flow patterns (parallel, sequence, choice, repetition etc. ) • 39 data patterns (scope, call-by regime, parameters etc. ) • 43 resource patterns (delegation) (implicit, queue, role, case, quality check) thus far • Can a process calculus handle this? ITU, Dec. 5, 2006 17
The 20 Control-Flow Patterns ITU, Dec. 5, 2006 18
A Look At Some Patterns Pattern 16: Deferred Choice Pattern 6: Multiple Choice Choose several execution paths Execute one of two alternative threads. The from many alternatives. choice [. . . ] should be implicit. Mult Pattern 20: Cancel Case Cancel (disable) the process) Def’d . . . Cancel Pattern 13: Multiple Instances [. . . ] Generate many instances of one activity [. . . ] with synchronization. ITU, Dec. 5, 2006 Pattern 10: Arbitrary Cycles a Merge b Merge c Choice d Choice e 19
Synch. Merge Has Non-Local Semantics • Workarounds 1. 2. 3. Integrate with split-end pattern (thus loosing free-form property) Decide runtime (thus loosing some static checks) Pass around meta-information from previous split(s) (thus complicating distribution and introducing complexity, also insufficient in degenerate cases) Workflowmønstre Intro Kodning Kontrakter CDL SMAWL Arkitektur Afslutning Synch. merge REA ITU, Dec. 5, 2006 20
Calculus of Communicating Systems • CCS syntax: Atomic tasks are simply written as a, b, c etc. • Pattern 1: Sequence P Q • a. P – not general enough • P. Q – not syntactic • Require processes to signal termination explicitly on a designated channel, e. g. ok • new go (P [go/ok] | go? . Q) ITU, Dec. 5, 2006 21
Example Encoding • Pattern 7/9: Multiple Choice/Discriminator • (. P 1 + . skip!) | | (. Pn + . skip!) | ok? . (Q | skip? *. 0 | ok? *. 0) P 1 Mult . . . Disc Q Pn ITU, Dec. 5, 2006 22
Example Encoding • Pattern 10: Arbitrary Cycles • new gob, goc (a. gob! | gob? *. b. goc! | goc? *. c. (gob! + d. (goc! + e)) a ITU, Dec. 5, 2006 Merge b Merge c Choice d Choice e 23
What Really Is Needed • Free structure or block structure Patterns have graph-type structure (YAWL, Petri nets, WFDL) as opposed to block structure (XLANG, parts of BPEL). Free structure creates nasty caveats and necessitates synchronizing merge. • Deferred vs. explicit choice Both must be supported • Many split and join variants But many seem better expressed by simple data-language. Need to support forks without synch. • Cancellation and Compensation Neither Petri nets nor pi-calculus handle this very well. LOTOS and CSP have operators for this. • Multiple Instances Generativity is essential ITU, Dec. 5, 2006 24
. . . And Can CCS Handle It Elegantly? • First Approximation of Expressiveness: local vs. global rewrites (Felleisen) • CCS cannot macro-express: • Sequence (!) • Cancellation • . . . more of the new patterns? • Some patterns blow up source code size ITU, Dec. 5, 2006 25
Future Research on Business Processes • Language for distributed processes with behavior types • Find/adapt/design suitable process calculus • Part of larger ERP architecture (3 g. ERP project) ITU, Dec. 5, 2006 26
Related Work • Pi. Duce – a project for experimenting with web services technologies Samuele Carpineti, Cosimo Laneve, Luca Padovani, Jan. 2006 • Compositional Contracts Peyton Jones, Eber, Seward, 2001 • Process Mining http: //processmining. org • Workflow Patterns http: //workflowpatterns. com ITU, Dec. 5, 2006 27
Q&A and thanks! • Thank you for having me! • Questions? • More info on: http: //www. stefansen. dk http: //www. it. edu/next/ ITU, Dec. 5, 2006 28
A Workflow in SMAWL workflow Q = Intro; choose any { Workflowmønstre; Kodning; SMAWL Intro Kontrakter; CDL REA }; Arkitektur; Afslutning end ITU, Dec. 5, 2006 Workflowmønstre Kodning Kontrakter CDL REA SMAWL Arkitektur Afslutning 29
Transforming SMAWL to CCS • Sequence • Multiple Instances ITU, Dec. 5, 2006 30
A Process-Oriented System Architecture (Highly speculative) ITU, Dec. 5, 2006
Future: A Process-Oriented Framework • Data model • Process mining • Inter-operability (ontology) • Process language • Base (data) language • Service patterns • Auto. GUI-generation environment events Processes Log push/pull observations Reports/monitors • Runtime verification • Incrementalization of reports • Stream processing • Dynamic operator placement in overlay networks ITU, Dec. 5, 2006 32
65b044d4aa28ebdc70a52aff4f265fb2.ppt