Commit 93bac6ea authored by Krzysztof Kutt's avatar Krzysztof Kutt
Browse files

cases: order fulfillment + travel booking

parent 4390ecfa
====== Order Fulfillment & Stock Maintenance Processes ======
Example from [[http://www.omg.org/spec/BPMN/20100601/10-06-02.pdf|BPMN 2.0 by Example]], page 5.
{{indexmenu>:bpwiki:process_order_fulfillment#1|js#simplebpmn navbar notoc}}
++++ Order Fulfillment Process code |
<bpmn subprocesses=collapse diagram=before>{
events: {
start: {
se_orderRec: {
name: "Order received",
type: message
}
},
end: {
ee_paymentRec: "Payment received",
ee_customerInf: "Customer informed",
ee_articleRem: "Article removed"
},
intermediate: {
ie_undeliverable: {
name: "undeliverable",
type: error
},
ie_lateDelivery: {
name: "late Delivery",
type: escalation,
nonInterrupting: true
}
}
},
activities: {
at_checkAva: "Check availability",
at_shipArticle: "Ship article",
task_infCustomer: "Inform customer",
task_infCustomer2: "Inform customer",
at_remArticle:
"Remove article from calatogue",
[[bpmn>bpwiki:process_order_fulfillment:process_finSettlement]],
[[bpmn>bpwiki:process_order_fulfillment:process_procurement]]
},
gateways: {
g_articleAvail: "Article available"
},
flow: {
f1: [ se_orderRec, at_checkAva ],
f2: [ at_checkAva, g_articleAvail ],
f3: [
g_articleAvail,
at_shipArticle,
"yes"
],
f4: [ at_shipArticle, process_finSettlement ],
f5: [ process_finSettlement, ee_paymentRec ],
//branch at g_articleAvail
f6: [
g_articleAvail,
process_procurement,
"no"
],
f7: [ process_procurement, at_shipArticle ],
//end
/* boundary events handling
- ie_lateDelivery */
f8: [ ie_lateDelivery, task_infCustomer ],
f9: [ task_infCustomer, ee_customerInf ],
//end
/* boundary events handling
- ie_undeliverable */
f10: [ ie_undeliverable, task_infCustomer2 ],
f11: [ task_infCustomer2, at_remArticle ],
f12: [ at_remArticle, ee_articleRem ]
//end
}
}</bpmn>
++++
++++ Stock Maintenance Process code |
<bpmn subprocesses=collapse diagram=before>{
events: {
start: {
se_stockLevel: {
type: conditional,
name: "Stock level below minimum"
}
},
intermediate: {
ie_undeliverable: {
type: error,
name: "undeliverable"
}
},
end: {
ee_articleProcured: "Article procured",
ee_articleRemoved: "Article removed"
}
},
activities: {
[[bpmn>bpwiki:process_order_fulfillment:process_procurement]],
task_removeArticle: "Remove article from catalogue"
},
flow: {
f1: [
se_stockLevel,
process_procurement
],
f2: [
process_procurement,
ee_articleProcured
],
f3: [
ie_undeliverable,
task_removeArticle
],
f4: [
task_removeArticle,
ee_articleRemoved
]
}
}</bpmn>
++++
{{indexmenu>:bpwiki:process_order_fulfillment|js#simplebpmn navbar notoc}}
<bpmn>{
name: "Financial settlement",
markers: [subprocess]
}</bpmn>
{{indexmenu>:bpwiki:process_order_fulfillment|js#simplebpmn navbar notoc}}
++++ Procurement code |
<bpmn>{
name: "Procurement",
activityType: call,
markers: [subprocess],
boundary: [
ie_lateDelivery,
ie_undeliverable
],
events: {
start: {
se_start: ""
},
intermediate: {
ie_lateDelivery: {
"throwing": true,
"type": "escalation",
"name": "Late delivery"
},
ie_articleReceived: {
"type": "message",
"name": "Article received"
}
},
end: {
ee_articleRemoved: "Article procured",
ee_underiverable: {
"type": "error",
"name": "undeliverable"
}
}
},
activities: {
task_checkAvaliability: "Check availability with supplier",
task_order: "Order from supplier"
},
gateways: {
gw_deliverable: "Deliverable?"
},
flow: {
f1: [
se_start,
task_checkAvaliability
],
f2: [
task_checkAvaliability,
gw_deliverable
],
f3: [
gw_deliverable,
task_order,
"< = 2 days"
],
f4: [
gw_deliverable,
ie_lateDelivery,
"> 2 days"
],
f5: [
gw_deliverable,
ee_underiverable,
"no"
],
f6: [
ie_lateDelivery,
task_order
],
f7: [
ie_articleReceived,
ee_articleRemoved
],
f8: [
task_order,
ie_articleReceived
]
}
}</bpmn>
++++
====== Travel Booking ======
Travel Booking diagram example from [[http://www.omg.org/spec/BPMN/20100601/10-06-02.pdf|BPMN 2.0 by Example]], page 27.
{{indexmenu>:bpwiki:process_travel_booking|js#simplebpmn navbar notoc}}
++++ Travel Booking code |
<bpmn subprocesses=collapse diagram=after>
{
"events": {
"start": {
"se_6_53": {
"type": "message",
"name": "Receive Customer Flight and Hotel Room Reservation Request"
}
},
"intermediate": {
"ie_6_439": {
"type": "timer",
"name": "24 hours"
},
"ie_6_456": {
"type": "message",
"name": "Cancel Request"
},
"ie_6_473": {
"type": "message",
"name": "Customer make Selection"
},
"ie_6_660": {
"type": "timer",
"name": "24 Hours"
},
"ie_6_1461": {
"type": "error",
"name": "Booking Error 2"
},
"ie_6_1549": {
"type": "error"
},
"ie_6_1566": {
"throwing": true,
"type": "compensation",
"name": "Booking"
}
},
"end": {
"ee_6_677": {
"type": "message",
"name": "Request Cancelled"
},
"ee_6_1533": "Booking Successfully Completed",
"ee_6_1677": "Booking Not Completed",
"ee_6_1742": ""
}
},
"activities": {
[[bpmn>bpwiki:process_travel_booking:process_search]],
"task_6_309": "Package Flights and Hotel Rooms for Customer Review",
"task_6_360": {
"type": "send",
"name": "Present Flights and Hotel Rooms Alternatives to Customer"
},
"task_6_490": "Update Customer Record (Request Cancelled)",
"task_6_541": {
"type": "send",
"name": "Notify Customer to Start Again"
},
"task_6_609": {
"type": "send",
"name": "Request Credit Card Information from Customer",
"boundary": [
"ie_6_660"
]
},
[[bpmn>bpwiki:process_travel_booking:process_booking]],
"task_6_1480": {
"name": "Charge Credit Card",
"boundary": [
"ie_6_1549"
]
},
"task_6_1626": {
"type": "send",
"name": "Notify Customer Invalid Credit Card"
},
"task_6_1620": {
"type": "send",
"name": "Notify Customer Failed Booking"
}
},
"gateways": {
"gw_6_415": {
"type": "event"
},
"gw_6_709": "",
"gw_6_1585": "Retry Limit Exceeded?",
"gw_6_594": "Retry Limit Exceeded?"
},
"flow": {
"f6_201": [
"se_6_53",
"process_search"
],
"f6_411": [
"process_search",
"task_6_309"
],
"f6_413": [
"task_6_309",
"task_6_360"
],
"f6_437": [
"task_6_360",
"gw_6_415"
],
"f6_592": [
"task_6_541",
"task_6_490"
],
"f6_691": [
"ie_6_456",
"task_6_490"
],
"f6_693": [
"gw_6_415",
"ie_6_456"
],
"f6_697": [
"gw_6_415",
"ie_6_439"
],
"f6_701": [
"gw_6_415",
"ie_6_473"
],
"f6_695": [
"task_6_490",
"ee_6_677"
],
"f6_699": [
"ie_6_439",
"task_6_541"
],
"f6_703": [
"ie_6_473",
"task_6_609"
],
"f6_705": [
"ie_6_660",
"task_6_541"
],
"f6_731": [
"task_6_609",
"gw_6_709"
],
"f6_1025": [
"gw_6_709",
"process_booking"
],
"f6_1531": [
"process_booking",
"task_6_1480"
],
"f6_1547": [
"task_6_1480",
"ee_6_1533"
],
"f6_1583": [
"ie_6_1549",
"ie_6_1566"
],
"f6_1607": [
"ie_6_1566",
"gw_6_1585"
],
"f6_1609": [
"gw_6_1585",
"task_6_609",
"No"
],
"f6_1616": [
"ie_6_1461",
"gw_6_594"
],
"f6_1618": [
"gw_6_594",
"gw_6_709",
"No"
],
"f6_1691": [
"gw_6_1585",
"task_6_1626",
"Yes"
],
"f6_1693": [
"task_6_1626",
"ee_6_1677"
],
"f6_1740": [
"gw_6_594",
"task_6_1620",
"Yes"
],
"f6_1756": [
"task_6_1620",
"ee_6_1742"
]
}
}</bpmn>++++
====== Booking ======
{{indexmenu>:bpwiki:process_travel_booking|js#simplebpmn navbar notoc}}
<bpmn subprocesses=expand diagram=before>
{
"events": {
"start": {
"se_6_766": ""
},
"intermediate": {
"ie_6_885": {
"type": "compensation",
"name": "Flight"
},
"ie_6_902": {
"type": "compensation",
"name": "Hotel"
}
},
"end": {
"ee_6_1027": "Reservation Completed"
}
},
"activities": {
[[bpmn>bpwiki:process_travel_booking:process_booking:process_updateccinfo]],
[[bpmn>bpwiki:process_travel_booking:process_booking:process_handlecompensation]],
[[bpmn>bpwiki:process_travel_booking:process_booking:process_handlebookingerror]],
"task_6_779": {
"name": "Book Flight",
"boundary": [
"ie_6_885"
]
},
"task_6_830": {
"name": "Book Hotel",
"boundary": [
"ie_6_902"
]
},
"task_6_919": {
"markers": [
"compensation"
],
"name": "Cancel Flight"
},
"task_6_970": {
"markers": [
"compensation"
],
"name": "Cancel Hotel"
}
},
"flow": {
"f6_881": [
"se_6_766",
"task_6_779"
],
"f6_883": [
"se_6_766",
"task_6_830"
],
"f6_1041": [
"task_6_779",
"ee_6_1027"
],
"f6_1043": [
"task_6_830",
"ee_6_1027"
],
"f6_1021": [
"ie_6_885",
"task_6_919"
],
"f6_1023": [
"ie_6_902",
"task_6_970"
]
},
"markers": [
"subprocess"
],
"name": "Booking",
"boundary": [
"ie_6_1461"
]
}</bpmn>
====== Process Handle Booking Error ======
{{indexmenu>bpwiki:process_travel_booking#1|js#simplebpmn navbar notoc}}
++++ Handle Booking Error Process code |
<bpmn subprocesses=collapse diagram=before>{
"events": {
"start": {
"se_6_1346": {
"type": "error",
"name": "Booking Error 1"
}
},
"intermediate": {
"ie_6_1381": {
"throwing": true,
"type": "compensation",
"name": "Flight"
},
"ie_6_1398": {
"throwing": true,
"type": "compensation",
"name": "Hotel"
}
},
"end": {
"ee_6_1437": {
"type": "error",
"name": "Booking Error 2"
}
}
},
"gateways": {
"gw_6_1359": {
"type": "parallel"
},
"gw_6_1415": {
"type": "parallel"
}
},
"flow": {
"f6_1451": [
"se_6_1346",
"gw_6_1359"
],
"f6_1453": [
"gw_6_1359",
"ie_6_1381"
],
"f6_1455": [
"gw_6_1359",
"ie_6_1398"
],
"f6_1457": [
"ie_6_1381",
"gw_6_1415"
],
"f6_1459": [
"ie_6_1398",
"gw_6_1415"
],
"f6_1478": [
"gw_6_1415",
"ee_6_1437"
]
},
"markers": [
"subprocess"
],
"activityType": "event",
"name": "Handle Booking Error"
}</bpmn>
++++
====== Process Handle Compensation ======
{{indexmenu>:bpwiki:process_travel_booking|js#simplebpmn navbar notoc}}
++++ Process Handle Compensation code |
<bpmn subprocesses=collapse diagram=before>{
"events": {
"start": {
"se_6_1193": {
"type": "compensation",
"name": "Booking"
}
},
"intermediate": {
"ie_6_1206": {
"throwing": true,
"type": "compensation",
"name": "Flight"
},
"ie_6_1223": {
"throwing": true,
"type": "compensation",
"name": "Hotel"
}
},
"end": {
"ee_6_1291": ""
}
},
"activities": {
"task_6_1240": "Update Customer Record"
},
"flow": {
"f6_1305": [
"se_6_1193",
"ie_6_1206"
],
"f6_1307": [
"ie_6_1206",
"ie_6_1223"