Modeling BPMN 2.0 Level 2 Lubomír Hruban & Lubomír Dočkal Seminar Overview • Introduce BPMN Level 2 modeling and its palette • Hands-on L2 • Modeling tips • Top 10 L2 Mistakes • L2 Homework (deadline March 30th at 5:00 PM) ○ Thursday • L1 Results ○ (published in Study_Materials/Seminars/L1-Results.pdf) Level 2 Modeling • Also known as analytical modeling • Created by process specialists • Still concerned with non-executable processes • Relies on information visible in the diagrams • Adds events, additional gateways, subprocess nesting • Often used for exception handling • From activity order (L1) to precise execution timing (L2) L2 Palette Spring 2014 ● Intermediate events ● More specific types of tasks ○ User ○ Service ○ Send ○ Receive ○ Manual ○ Script ○ Business rule ○ Abstract ● Event and complex gateway ● Iterations in multiple instances Hands-on #1 ● We have ingredients for more Pizzas ● Update process so that more pizzas are prepared ● Hint: Pizzas are done sequentially Hands-on #1: Solution ● We have ingredients for more Pizzas ● Update process so that more pizzas are prepared ● Hint: Pizzas are done sequentially Hands-on #2 ● While preparing ingredients customer can cancel order ○ If customer tries to cancel then the customer is acknowledged about cancellation and ingredients are returned to the fridge ● While preparing pizza customer cannot cancel ○ If customer tries to cancel then the customer is notified: “It is too late to cancel” Hands-on #2: Solution Hands-on #3 ● If bank does not respond in 2 minutes then standard activity for resolving issue is called ○ If issue is not resolved in 1 hour bank is notified and transaction fails ● If bank process transaction within 2 minutes then the transaction’s result can be either success or failure Hands-on #3: Solution L2 Types of Tasks ● User: A User Task is a typical “workflow” Task where a human performer performs the Task with the assistance of a software application and is scheduled through a task list manager of some sort. ● Service: A Service Task is a Task that uses some sort of service, which could be a Web service or an automated application. ● Send: A Send Task is a simple Task that is designed to send a Message to an external Participant (relative to the Process). Once the Message has been sent, the Task is completed. ● Receive: A Receive Task is a simple Task that is designed to wait for a Message to arrive from an external Participant (relative to the Process). Once the Message has been received, the Task is completed. ● Manual: A Manual Task is a Task that is expected to be performed without the aid of any business process execution engine or any application. ● Script: A Script Task is executed by a business process engine. The modeler or implementer defines a script in a language that the engine can interpret. When the Task is ready to start, the engine will execute the script. When the script is completed, the Task will also be completed. ● Business rule: A Business Rule Task provides a mechanism for the Process to provide input to a Business Rules Engine and to get the output of calculations that the Business Rules Engine might provide. ● Abstract: Not specified yet (in Signavio it is called None). Message Events ● Message is the content of communication between two different participants (not in the same process) ● Message can take any form ● Message flow is addressed to a particular process or process instance ● Use verbs like send or receive as a keywords Hidden Message Flow Avoid this: When handling is non-trivial activity: L2 Messaging We should be more precise when modeling messaging in L2 A one task should not be responsible for multiple message flows. We should model it into detail using dedicated events or tasks. Event or Task? ● In general, we can say that: ● But there are some differences: ○ Events happen immediately when triggered but tasks take time to be executed (we can emphasize that it activity takes more effort when we use task) ○ Tasks can have boundary events (events can’t, they are atomic) Signal Events ● Signal is broadcast and it is loosely coupled ● Can be used within pool, between processes and process instances ● In diagram there is no message flow between signals (only naming emphasizes relationship) ● Signal start event means that process is subscribed to another process or processes Error Events ● Only as error end event or interrupting boundary error event ● Can be usually transform with usage of XOR gateway: *It is totally equal only if we can change internally Check credit Loop Transformation Top 10 Mistakes Inappropriate Naming Here is a task used instead of an event. Clumsy name of the task signals us that we are using wrong modeling concept. Lanes should express the role which is responsible for performing task. Not the name of task itself. Exception Handling The process should handle exception appropriately (try to resolve exception, or terminate properly other tokens and inform other processes if necessary). Messages in Pool Variants of hidden message flow. Boundary Events Even task with boundary event has to have standard outgoing sequence flow. Timer does not say how much time it takes to finish task. It just says what should be done when timebox expires. Therefore, there has to be outgoing sequence flow. Deadlock If after XOR gateway token flows to B then parallel gateway will wait forever for token from A. Summary ● Understand purpose and usage of BPMN L2 ● Practiced L2 ● More familiar with the most common L2 elements ● Review common mistakes in L2 L2 Assignment ● Create one business process using BPMN L2 (it is prefered when you extend your L1 process): ○ 8+ activities ○ 4+ gateways, 2 different types ○ 3+ intermediate events (2+ different types) ○ 1+ data object ○ 2+ text annotations ○ 2+ pools, 1 as „blackbox“, 2+ roles (swimlanes) ○ 1+ exception and appropriate handling ○ Brief summary of the process (2+ sentences) ● Submit printed version with UČO and name of seminar group to the box called PV207 next to entrance to room D1 (before 9.4. 5:00 PM) ● Submit electronic version of diagram in Signavio as PDF to IS MUNI to folder "Homework 2" as _bpmn.png (before 9.4. 5:00 PM) Thank you for your attention! Results HW Assignment (max 8 points)