A CSPm Model for the Procure to Pay Case Study



Similar documents
BPMN PATTERNS USED IN MANAGEMENT INFORMATION SYSTEMS

A Framework for the Semantics of Behavioral Contracts

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

An Evaluation of Conceptual Business Process Modelling Languages

Quality Ensuring Development of Software Processes

Using Use Cases for requirements capture. Pete McBreen McBreen.Consulting

Modelling Workflow with Petri Nets. CA4 BPM PetriNets

Sofware Requirements Engineeing

Formal Specification Methods for the Improvement of Process and Product Quality

Chap 1. Introduction to Software Architecture

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Supporting the Workflow Management System Development Process with YAWL

The S-BPM Architecture: A Framework for Multi-Agent Systems

PLG: a Framework for the Generation of Business Process Models and their Execution Logs

Chapter 2 Introduction to Business Processes, BPM, and BPM Systems

WoPeD - An Educational Tool for Workflow Nets

Business Process Modeling

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

CHAPTER 1 INTRODUCTION

Towards Management of SLA-Aware Business Processes Based on Key Performance Indicators

ATM Case Study Part 1

Towards a Process Algebra Framework for Supporting Behavioural Consistency and Requirements Traceability in SysML

Mapping from Business Processes to Requirements Specification

CPS122 Lecture: State and Activity Diagrams in UML

Open S-BPM: Goals and Architecture

Kirsten Sinclair SyntheSys Systems Engineers

Towards Cross-Organizational Process Mining in Collections of Process Models and their Executions

Using Use Cases on Agile Projects

Process Modelling from Insurance Event Log

Overview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series

WHERE DOES THE 10% CONDITION COME FROM?

A Software Framework for Risk-Aware Business Process Management

3 Extending the Refinement Calculus

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT SYSTEMS ANALYSIS & DESIGN EXAMINERS REPORT

Better Processes = Better E-Commerce

Lecture 03 ( ) Quality of the Software Development Process

UML TUTORIALS THE USE CASE MODEL

Investigating a File Transfer Protocol Using CSP and B

XoWiki Content Flow From a Wiki to a Simple Workflow System

RUP iteration planning

Advanced Software Engineering ( -Formal specification, verification, transformation, and application-

MODELING OF SERVICE ORIENTED ARCHITECTURE: FROM BUSINESS PROCESS TO SERVICE REALISATION

Workflow Patterns in Orc

ECM Recommendation Part 1 (ECR) Version 2.0, Issued Aug Replacements: Version 1.0

Bizagi BPM Suite Loan Assessment Process Lab

A pattern based approach to defining the dynamic infrastructure of UML 2.0

MODEL CHECKING OF SERVICES WORKFLOW RECONFIGURATION: A PERSPECTIVE ON DEPENDABILITY

Modeling Workflow Patterns

Requirements / Use Case Specification

University of Pisa. MSc in Computer Engineering. Business Processes Management. Lectures

REQUIREMENTS FOR THE WORKFLOW-BASED SUPPORT OF RELEASE MANAGEMENT PROCESSES IN THE AUTOMOTIVE SECTOR

Demonstrating WSMX: Least Cost Supply Management

From Workflow Design Patterns to Logical Specifications

Chapter 4 Software Lifecycle and Performance Analysis

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems

Towards Flexible Business Process Modeling and Implementation: Combining Domain Specific Modeling Languages and Pattern-based Transformations

EXTREME: EXecuTable Requirements Engineering, Management and Evolution. Dr. Ella Roubtsova Open University of the Netherlands

Using YAWL in a Business Undergraduate Course on Process Management: An Experience Report

Activity Mining for Discovering Software Process Models

NP-Completeness and Cook s Theorem

Regular Expressions and Automata using Haskell

The Role of Modelling in Teaching Formal Methods for Software Engineering

AMFIBIA: A Meta-Model for the Integration of Business Process Modelling Aspects

1(a). How many ways are there to rearrange the letters in the word COMPUTER?

Test case design techniques II: Blackbox testing CISS

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Software Engineering Reference Framework

Policy Modeling and Compliance Verification in Enterprise Software Systems: a Survey

The ProB Animator and Model Checker for B

A Meta-model of Business Interaction for Assisting Intelligent Workflow Systems

Execution of A Requirement Model in Software Development

A Pattern-based Approach to Business Process Modeling and Implementation in Web Services

Aspect Oriented Strategy to model the Examination Management Systems

997 Functional Acknowledgment

Zen Broadband & Line Rental Price List

EFFECTIVE CONSTRUCTIVE MODELS OF IMPLICIT SELECTION IN BUSINESS PROCESSES. Nataliya Golyan, Vera Golyan, Olga Kalynychenko

BPMN VS. UML ACTIVITY DIAGRAM FOR BUSINESS PROCESS MODELING

Modeling Human Actors in an Intelligent Automated Warehouse

PROCESS-DRIVEN SOFTWARE DEVELOPMENT METHODOLOGY FOR ENTERPRISE INFORMATION SYSTEM

Applying 4+1 View Architecture with UML 2. White Paper

14.1 Rent-or-buy problem

StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java

Reading 13 : Finite State Automata and Regular Expressions

A Pattern for the Decomposition of Business Processes

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CASSANDRA: Version: / 1. November 2001

Introducing the Dezyne Modelling Language

Modeling and Performance Evaluation of Computer Systems Security Operation 1

BPMN Business Process Modeling Notation

Automata and Computability. Solutions to Exercises

CPN Tools 4: A Process Modeling Tool Combining Declarative and Imperative Paradigms

Advanced Computing Tools for Applied Research Chapter 1. Introduction to software engineering

Business Independent Model of Mobile Workforce Management

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

25 Integers: Addition and Subtraction

Model Inconsistency Management

A Cost-object Model for Activity Based Costing Simulation of Business Processes

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Transcription:

A CSPm Model for the Procure to Pay Case Study Andreas V. Hense Bonn-Rhein-Sieg University oas, Grantham-Allee 20, 53757 Sankt Augustin, Germany, andreas.hense@brsu.de Abstract. The model presented here is part of a comparative evaluation effort of paradigms and tools for business process modelling. The model is written in CSPm a machine readable dialect of CSP and covers the case study Procure to Pay (P2P [1]. This paper shows the step by step development of the P2P case study using CSPm. We use the refinement notion of CSP to show which communications are possible. 1 Introduction The case study Procure to Pay (P2P [1] is a typical business process that can be automated using a workflow management system. In another article of this comparative evaluation effort [4] we have shown how to automate P2P using the workflow managment system YAWL [10]. We have also shown [5] how to automate P2P using the S-BPM method [2]. Like YAWL, S-BPM is a full-fledged workflow system. The underlying paradigm of YAWL is Petri nets. The underlying paradigm of S-BPM is Communicating Sequential Processes (CSP [6]. We have built the model for P2P with CSP [6] or more precisely with the machine-readable version of CSP called CSPm [8, 9] because we wanted to see the differences between S-BPM and CSP and the essence of the P2P case study compared to the ATM case study [3]. CSPm is not a workflow management system but a formal calculus. CSPm has a notion of refinement that can be checked automatically. In order to keep the models at a reasonable size and to be able to use the refinement checker, some simplifications were necessary. The greatest simplification is that our model describes only one case of the business process. The functionality of a workflow management system of handling different cases and distributing the work to different participants is not contained in our model. The complete CSPm source code for use with the Process Behaviour Explorer (ProBE 1 and the refinement checker FDR2 2 can be downloaded from our website 3. 1 http://www.fsel.com/probe download.html 2 http://www.cs.ox.ac.uk/projects/concurrency-tools/ 3 http://www.bis.inf.fh-bonn-rhein-sieg.de/bpmcasestudies

2 2 Procure to Pay In the case study P2P, a site engineer wants to rent some equipment. Together with other participants of his organisation, the equipment is ordered for rental and finally payed for. The process contains five roles: a site engineer (SE, a clerk (CL, a supplier (SU, a works engineer (WE, and the finance department (FD. Following the recommendations of the S-BPM method [2] we start with a process overview showing the processes and their communication. The process overview in figure 1 shows processes and their communication 4. It contains processes for each of the roles mentioned above. Furthermore, there is a process for the date because an extension request can only be issued one or two days before the end of the rental period. The CSPm model of P2P models the process for one process instance or one case. A an example for a simple run through the process in CSPm syntax is shown in the following listing: Listing 1.1. Simple P2P usage scenario SIMPLE = eqrentreq. Dumper. 4. 4 > availcheck. Dumper. 1. 2. 4. 4 > availanswer. true > appreq. Dumper. 1. 2. 4. 4 > appanswer. true > purchaseorder. Dumper. 1. 2. 4. 4 > d e l i v e r E q. Dumper. 1. 2. 4. 4 > tock > tock > tock > tock > datereqsu > dateanswersu. 5 > s e n d I n v o i c e. Dumper. 1. 2. 4. 4. 1 > appinvreq. 4. 4 > appinvanswer. true > payinvoice. 2. 1 > STOP The site engineer requests a dumper for day 4 (days are a subset of integer numbers and the equipment rental request has the start and end day as its two last parameters. The clerk looks up a catalogue and asks supplier number 2 if the dumper with a price of 1 is available from day 4 until day 4 5. After receiving a positive answer from the supplier, he asks the works engineer for approval. After receiving the approval, he sends a purchase order to the supplier who in turn delivers the equipment to the site engineer. We had started at day one. Now we advance the clock by four days using tock. The supplier now asks for the date and sees that the rental is over. 4 In S-BPM processes are called subjects [2] 5 The data domains had to be kept to a mininum in order to achieve acceptable runtimes of the refinement checker.

Fig. 1. Process overview of P2P 3

4 He can now send an invoice with cost 1 to the clerk. The clerk asks the site engineer if the equipment has really been rented from day 4 until day 4. After a positive answer he checks that the price has been calculated correctly and pays the invoice. 6 This concludes the simple scenario of what may happen in P2P. We will now proceed with the definition of the processes that make such a scenario possible. 2.1 The Site Engineer The process of the site engineer is called SE and is contained in the following listing. There are three uses of the internal choice operator 7 which read as follows: the site engineer nondeterministically chooses an equipment, a from-date, and a to-date. Then he sends a corresponding equipment rental request and goes to a waiting mode called SE wait. The waiting mode is parameterised with the equipment and the two dates. Since CSPm is essentially functional programming plus communication this is the way to remember these parameters. SE = eq : eqtype@ ( from : { minrent.. maxrent}@( to : { from.. maxrent}@( eqrentreq. eq. from. to > SE wait ( eq. from. to While the site engineer is in the waiting mode, two things can happen: either he receives a copy of the purchase order from the clerk and goes to mode SE expect or he cancels the equipment rental request and goes back to the initial mode SE. SE wait (err = purchaseorder?eerr > SE expect (eerr [ ] c a n c e l > SE In the expecting mode, the site engineer waits for a message that the equipment has been delivered and goes to a renting mode. SE expect (eerr = d e l i v e r E q?eerr > SE rent (eerr 6 The visualisation of this simple run as a UML sequence diagram [7] is left as an exercise. 7 The internal choice is denoted by in CSP and by a sequence of three keyboard characters resembling in CSPm.

5 While the site engineer is in the renting mode, two things can happen. He may get a request from the clerk to approve the dates of an invoice sent previously by the supplier. Or he asks for an extension of the rental period. The latter is only possible before the end date of the rental. The extension request may be rejected by the supplier. SE rent (eerr@@eq. p. s. from. to = ( appinvreq? frominv? toinv > appinvanswer. ( frominv==from and t o I n v==t o > SE [ ] ( datereqse > dateanswerse? d > ( i f ( d < to and to < maxrent then ( newto : { ( to + 1.. maxrent}@( extreq. eq. p. s. from. newto > ( ( grantext? true > SE rent ( eq. p. s. from. newto [ ] ( grantext? f a l s e > SE rent ( eq. p. s. from. to e l s e SE rent ( eq. p. s. from. to 2.2 The Clerk When the clerk receives an equipment rental request from the site engineer he looks up the catalogue and extends the equipment rental request by a daily price and a supplier. CL = eqrentreq?( eq. from. to > p : dailyprice@ ( s : supplier@ ( CL rec ( eq. p. s. from. to He then checks the availability with the supplier and goes to a waiting mode. CL rec (eerr = availcheck. eerr > CL wait (eerr If the equipment chosen is not available, the clerk selects a different solution from the catalogue and returns to the previous mode. If the equipment is available he goes to a mode called CL avail.

6 CL wait (eerr@@eq. p. s. from. to = availanswer? : { true } > CL avail (eerr [ ] availanswer? : { f a l s e } > p : dailyprice@ ( s : supplier@ ( CL rec ( eq. p. s. from. to Depending on the approval of the equipment he selects a different solution from the catalogue and returns to mode CL rec or he proceeds. CL avail (eerr@@eq. p. s. from. to = appreq. eerr > ( appanswer? : { true } > CL app (eerr [ ] appanswer? : { f a l s e } > p : dailyprice@ ( s : supplier@ ( CL rec ( eq. p. s. from. to Before sending the purchase order to the supplier he can receive a cancel request from the site engineer. This was one requirement of the case study. CL app (eerr@@eq. p. s. from. to = purchaseorder. eerr > CL ord (eerr c a n c e l > CL In the next step, he receives an invoice from the supplier. As the clerk has not been informed of a possible extension of the rental period he asks the site engineer for the approval of the dates in the invoice. After that he checks if the calculation of the total is correct and tells the finance department to pay the invoice. CL ord (eerr@@eq. p. s. from. to = s e n d I n v o i c e? eqinv? pinv? sinv? frominv? toinv? p r i c e > appinvreq. frominv. toinv > ( appinvanswer? : { true } > ( i f ( p r i c e==pinv ( toinv frominv +1 then ( payinvoice. sinv. p r i c e > CL

7 e l s e CL [ ] appinvanswer? : { f a l s e } > CL 2.3 The Supplier The supplier waits for an availability check or a purchase order. If he gets a purchase order he goes to the next mode. SU = ( availcheck?(eerr > ( availanswer. true > SU availanswer. f a l s e > SU [ ] ( purchaseorder?eerr > d e l i v e r E q. eerr > SU del (eerr In the next mode he can receive an extension request. He can also ask for the date and send an invoice if the rental period is over. SU del (eerr@@eq. p. s. from. to = ( extreq?eerr > ( grantext. true > SU del (eerr grantext. f a l s e > SU del (eerr ( datereqsu > dateanswersu? d > ( i f (d>to and to>=from then ( s e n d I n v o i c e. eerr. ( p ( to from +1 > STOP e l s e SU del (eerr 2.4 The Other Processes The works engineer simply accepts or rejects any approval request he receives. WE = appreq?eerr > ( ( appanswer. true > WE

8 ( appanswer. f a l s e > WE The finance department simply pays any invoice upon request. FD = payinvoice? sinv? p r i c e > FD The date process has the current date as its internal mode. The date is incremented upon tock messages from the environment up to a maximal value. When asked the date by the supplier or the site engineer it answers with the current date. Date = D( 1 D( i = tock > ( i f i < maxdate then D( i +1 e l s e D max( i [ ] ( datereqse > dateanswerse. i > D( i [ ] ( datereqsu > dateanswersu. i > D( i Once the date has reached the maximal value, the date process in mode D max does not accept any more tock messages from the environment but still answers date requests by the site engineer or the supplier. D max( i = ( datereqse > dateanswerse. i > D( i [ ] ( datereqsu > dateanswersu. i > D( i 2.5 The Procure to Pay Process The complete process is created by alphabetised parallel composition of all processes defined in the last sections. The respective alphabets are defined in the supplementary material on our website 8. The parallel composition is shown in the next listing. P2P = ( ( ( (CL [ alphcl alphwe ] WE [ alphcl alphfd ] FD 8 http://www.bis.inf.fh-bonn-rhein-sieg.de/bpmcasestudies

9 [ alphcl alphsu ] SU [ alphcl and SU alphse ] SE [ alphcl and SU and SE alphdate ] Date We can now prove that the scenario of listing 1.1 is indeed a behaviour of the P2P process. a s s e r t P2P [T= SIMPLE 2.6 Conclusion We have started the modelling effort with the process overview in figure 1. During the definition of the CSP processes many questions arose that would have been answered by subject matter experts in real life. The description of the case study P2P [1] fits on one page and cannot be a complete specification for the automation of the P2P process. Eliciting additional requirements during formalisation of a problem happens in every software project. The CSP specification that contains approximately 300 lines of code shows the following characteristics. The site engineer and the clerk are the central roles. The process definition of the site engineer consists of four mutually recursive equations that correspond to modes. These modes correspond to the states of the site engineer in [11]. The clerk has six modes. 9 These modes correspond to the states of the site engineer in [11]. The internal state information that these processes need is an extended equipment rental request. From the process definitions it is easy to derive UML sequence diagrams [7]. The tool ProBE allows us to explore all possible traces and FDR2 does trace refinement checks among others. The trace refinement checks can be used in this example for verifying if certain runs are possible. It is relatively easy in CSP to inadvertedly produce deadlocks or livelocks during process definitions. FDR2 can check for the presence of these and give concrete traces that lead to a dealock or livelock. This feature was useful during the development of our model. The automatic checking comes at a price: all data domains have to be finite and be of small cardinality in order to cope with combinatorial explosion. One important aspect of the problem, namely the resource perspective, has not been modelled. The model contains only one case. Distributing the work to different participants with the same role etc. is therefore not part of the model. In this respect the model is much less complete than the CSP model of the ATM case study [3]. References 1. M. Dumas, M. L. Rosa, J. Mendling, and H. A. Reijers. Fundamentals of Business Process Management. Springer Berlin Heidelberg, Jan. 2013. 9 The visualisation of these as a UML state diagram [7] is left as an exercise.

10 2. A. Fleischmann, S. Rass, and R. Singer. S-BPM illustrated: a storybook about business process modeling and execution. 2013. 3. A. V. Hense. CSPm models for the automated teller machine case study. In Special Session on Comparative Case Studies, Kiel, 2015. submitted for publication. 4. A. V. Hense and R. Malz. Automation of the automated teller machine case study with YAWL. In Special Session on Comparative Case Studies, Kiel, 2015. submitted for publication. 5. A. V. Hense and R. Malz. Automation of the procure to pay case study with YAWL. In Special Session on Comparative Case Studies, Kiel, 2015. submitted for publication. 6. C. A. R. Hoare. Communicating sequential processes. Prentice/Hall International, Englewood Cliffs, N.J., 1985. 7. OMG. OMG unified modeling language (OMG UML, superstructure, Aug. 2011. Version 2.4.1. 8. A. W. Roscoe. The theory and practice of concurrency. Prentice Hall, London; New York, 1998. 9. A. W. Roscoe. Understanding Concurrent Systems. Springer, London ; New York, 2010. 10. A. H. M. ter Hofstede, W. M. P. van der Aalst, M. Adams, and N. Russell. Modern Business Process Automation: YAWL and its Support Environment. Springer, Berlin, 1 edition, 2010. 11. S. Zenzaro. An ASM model for the ProcureToPay case study. In Special Session on Comparative Case Studies, Kiel, 2015. submitted for publication.