{ events:{ start:{ se:{ name:"Start" } }, end:{ ee1:{ name:"Bank transfer succeed" }, ee2:{ name:"Bank transfer failed" }, ee3:{ name:"Bank transfer canceled" } }, intermediate:{ cancel1:{ type:cancel }, error1:{ type: error } } }, activities:{ a1:{ name:"Order a bank transfer", type:user }, a2:{ name:"Transaction", activityType: transaction, boundary: [cancel1,error1], events:{ start:{ tes:"" }, end:{ tee:"" }, intermediate:{ compensation1:{ type: compensation }, compensation2:{ type: compensation } } }, activities:{ ta1:{ name:"Take the money", type:service, boundary: [compensation1] }, ta2:{ name:"Deliver the money", type:service, boundary: [compensation2] }, ta3:{ name:"Give back the money", type:service, markers: [compensation] }, ta4:{ name:"Take the delivered money back", type:service, markers: [compensation] } }, flow:{ f1:[tes,ta1], f2:[ta1,ta2], f3:[ta2,tee], f4:[ta1,ta3], f5:[ta2,ta4] } }, a3:{ name: "Report complaint", type: user } }, flow:{ f1:[se,a1], f2:[a1,a2], f3:[a2,ee1], f4:[cancel1,ee3], f5:[error1,a3], f6:[a3,ee2] } }