ReplaceOptions.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. /**
  2. * @typedef { () => string } LabelGetter
  3. *
  4. * @typedef { {
  5. * label: string | LabelGetter;
  6. * actionName: string;
  7. * className: string;
  8. * target?: {
  9. * type: string;
  10. * isExpanded?: boolean;
  11. * isInterrupting?: boolean;
  12. * triggeredByEvent?: boolean;
  13. * cancelActivity?: boolean;
  14. * eventDefinitionType?: string;
  15. * eventDefinitionAttrs?: Record<string, any>
  16. * };
  17. * } } ReplaceOption
  18. */
  19. /**
  20. * @type {ReplaceOption[]}
  21. */
  22. export var START_EVENT = [
  23. {
  24. label: 'Start event',
  25. actionName: 'replace-with-none-start',
  26. className: 'bpmn-icon-start-event-none',
  27. target: {
  28. type: 'bpmn:StartEvent'
  29. }
  30. },
  31. {
  32. label: 'Intermediate throw event',
  33. actionName: 'replace-with-none-intermediate-throwing',
  34. className: 'bpmn-icon-intermediate-event-none',
  35. target: {
  36. type: 'bpmn:IntermediateThrowEvent'
  37. }
  38. },
  39. {
  40. label: 'End event',
  41. actionName: 'replace-with-none-end',
  42. className: 'bpmn-icon-end-event-none',
  43. target: {
  44. type: 'bpmn:EndEvent'
  45. }
  46. },
  47. {
  48. label: 'Message start event',
  49. actionName: 'replace-with-message-start',
  50. className: 'bpmn-icon-start-event-message',
  51. target: {
  52. type: 'bpmn:StartEvent',
  53. eventDefinitionType: 'bpmn:MessageEventDefinition'
  54. }
  55. },
  56. {
  57. label: 'Timer start event',
  58. actionName: 'replace-with-timer-start',
  59. className: 'bpmn-icon-start-event-timer',
  60. target: {
  61. type: 'bpmn:StartEvent',
  62. eventDefinitionType: 'bpmn:TimerEventDefinition'
  63. }
  64. },
  65. {
  66. label: 'Conditional start event',
  67. actionName: 'replace-with-conditional-start',
  68. className: 'bpmn-icon-start-event-condition',
  69. target: {
  70. type: 'bpmn:StartEvent',
  71. eventDefinitionType: 'bpmn:ConditionalEventDefinition'
  72. }
  73. },
  74. {
  75. label: 'Signal start event',
  76. actionName: 'replace-with-signal-start',
  77. className: 'bpmn-icon-start-event-signal',
  78. target: {
  79. type: 'bpmn:StartEvent',
  80. eventDefinitionType: 'bpmn:SignalEventDefinition'
  81. }
  82. }
  83. ];
  84. /**
  85. * @type {ReplaceOption[]}
  86. */
  87. export var START_EVENT_SUB_PROCESS = [
  88. {
  89. label: 'Start event',
  90. actionName: 'replace-with-none-start',
  91. className: 'bpmn-icon-start-event-none',
  92. target: {
  93. type: 'bpmn:StartEvent'
  94. }
  95. },
  96. {
  97. label: 'Intermediate throw event',
  98. actionName: 'replace-with-none-intermediate-throwing',
  99. className: 'bpmn-icon-intermediate-event-none',
  100. target: {
  101. type: 'bpmn:IntermediateThrowEvent'
  102. }
  103. },
  104. {
  105. label: 'End event',
  106. actionName: 'replace-with-none-end',
  107. className: 'bpmn-icon-end-event-none',
  108. target: {
  109. type: 'bpmn:EndEvent'
  110. }
  111. }
  112. ];
  113. /**
  114. * @type {ReplaceOption[]}
  115. */
  116. export var INTERMEDIATE_EVENT = [
  117. {
  118. label: 'Start event',
  119. actionName: 'replace-with-none-start',
  120. className: 'bpmn-icon-start-event-none',
  121. target: {
  122. type: 'bpmn:StartEvent'
  123. }
  124. },
  125. {
  126. label: 'Intermediate throw event',
  127. actionName: 'replace-with-none-intermediate-throw',
  128. className: 'bpmn-icon-intermediate-event-none',
  129. target: {
  130. type: 'bpmn:IntermediateThrowEvent'
  131. }
  132. },
  133. {
  134. label: 'End event',
  135. actionName: 'replace-with-none-end',
  136. className: 'bpmn-icon-end-event-none',
  137. target: {
  138. type: 'bpmn:EndEvent'
  139. }
  140. },
  141. {
  142. label: 'Message intermediate catch event',
  143. actionName: 'replace-with-message-intermediate-catch',
  144. className: 'bpmn-icon-intermediate-event-catch-message',
  145. target: {
  146. type: 'bpmn:IntermediateCatchEvent',
  147. eventDefinitionType: 'bpmn:MessageEventDefinition'
  148. }
  149. },
  150. {
  151. label: 'Message intermediate throw event',
  152. actionName: 'replace-with-message-intermediate-throw',
  153. className: 'bpmn-icon-intermediate-event-throw-message',
  154. target: {
  155. type: 'bpmn:IntermediateThrowEvent',
  156. eventDefinitionType: 'bpmn:MessageEventDefinition'
  157. }
  158. },
  159. {
  160. label: 'Timer intermediate catch event',
  161. actionName: 'replace-with-timer-intermediate-catch',
  162. className: 'bpmn-icon-intermediate-event-catch-timer',
  163. target: {
  164. type: 'bpmn:IntermediateCatchEvent',
  165. eventDefinitionType: 'bpmn:TimerEventDefinition'
  166. }
  167. },
  168. {
  169. label: 'Escalation intermediate throw event',
  170. actionName: 'replace-with-escalation-intermediate-throw',
  171. className: 'bpmn-icon-intermediate-event-throw-escalation',
  172. target: {
  173. type: 'bpmn:IntermediateThrowEvent',
  174. eventDefinitionType: 'bpmn:EscalationEventDefinition'
  175. }
  176. },
  177. {
  178. label: 'Conditional intermediate catch event',
  179. actionName: 'replace-with-conditional-intermediate-catch',
  180. className: 'bpmn-icon-intermediate-event-catch-condition',
  181. target: {
  182. type: 'bpmn:IntermediateCatchEvent',
  183. eventDefinitionType: 'bpmn:ConditionalEventDefinition'
  184. }
  185. },
  186. {
  187. label: 'Link intermediate catch event',
  188. actionName: 'replace-with-link-intermediate-catch',
  189. className: 'bpmn-icon-intermediate-event-catch-link',
  190. target: {
  191. type: 'bpmn:IntermediateCatchEvent',
  192. eventDefinitionType: 'bpmn:LinkEventDefinition',
  193. eventDefinitionAttrs: {
  194. name: ''
  195. }
  196. }
  197. },
  198. {
  199. label: 'Link intermediate throw event',
  200. actionName: 'replace-with-link-intermediate-throw',
  201. className: 'bpmn-icon-intermediate-event-throw-link',
  202. target: {
  203. type: 'bpmn:IntermediateThrowEvent',
  204. eventDefinitionType: 'bpmn:LinkEventDefinition',
  205. eventDefinitionAttrs: {
  206. name: ''
  207. }
  208. }
  209. },
  210. {
  211. label: 'Compensation intermediate throw event',
  212. actionName: 'replace-with-compensation-intermediate-throw',
  213. className: 'bpmn-icon-intermediate-event-throw-compensation',
  214. target: {
  215. type: 'bpmn:IntermediateThrowEvent',
  216. eventDefinitionType: 'bpmn:CompensateEventDefinition'
  217. }
  218. },
  219. {
  220. label: 'Signal intermediate catch event',
  221. actionName: 'replace-with-signal-intermediate-catch',
  222. className: 'bpmn-icon-intermediate-event-catch-signal',
  223. target: {
  224. type: 'bpmn:IntermediateCatchEvent',
  225. eventDefinitionType: 'bpmn:SignalEventDefinition'
  226. }
  227. },
  228. {
  229. label: 'Signal intermediate throw event',
  230. actionName: 'replace-with-signal-intermediate-throw',
  231. className: 'bpmn-icon-intermediate-event-throw-signal',
  232. target: {
  233. type: 'bpmn:IntermediateThrowEvent',
  234. eventDefinitionType: 'bpmn:SignalEventDefinition'
  235. }
  236. }
  237. ];
  238. /**
  239. * @type {ReplaceOption[]}
  240. */
  241. export var END_EVENT = [
  242. {
  243. label: 'Start event',
  244. actionName: 'replace-with-none-start',
  245. className: 'bpmn-icon-start-event-none',
  246. target: {
  247. type: 'bpmn:StartEvent'
  248. }
  249. },
  250. {
  251. label: 'Intermediate throw event',
  252. actionName: 'replace-with-none-intermediate-throw',
  253. className: 'bpmn-icon-intermediate-event-none',
  254. target: {
  255. type: 'bpmn:IntermediateThrowEvent'
  256. }
  257. },
  258. {
  259. label: 'End event',
  260. actionName: 'replace-with-none-end',
  261. className: 'bpmn-icon-end-event-none',
  262. target: {
  263. type: 'bpmn:EndEvent'
  264. }
  265. },
  266. {
  267. label: 'Message end event',
  268. actionName: 'replace-with-message-end',
  269. className: 'bpmn-icon-end-event-message',
  270. target: {
  271. type: 'bpmn:EndEvent',
  272. eventDefinitionType: 'bpmn:MessageEventDefinition'
  273. }
  274. },
  275. {
  276. label: 'Escalation end event',
  277. actionName: 'replace-with-escalation-end',
  278. className: 'bpmn-icon-end-event-escalation',
  279. target: {
  280. type: 'bpmn:EndEvent',
  281. eventDefinitionType: 'bpmn:EscalationEventDefinition'
  282. }
  283. },
  284. {
  285. label: 'Error end event',
  286. actionName: 'replace-with-error-end',
  287. className: 'bpmn-icon-end-event-error',
  288. target: {
  289. type: 'bpmn:EndEvent',
  290. eventDefinitionType: 'bpmn:ErrorEventDefinition'
  291. }
  292. },
  293. {
  294. label: 'Cancel end event',
  295. actionName: 'replace-with-cancel-end',
  296. className: 'bpmn-icon-end-event-cancel',
  297. target: {
  298. type: 'bpmn:EndEvent',
  299. eventDefinitionType: 'bpmn:CancelEventDefinition'
  300. }
  301. },
  302. {
  303. label: 'Compensation end event',
  304. actionName: 'replace-with-compensation-end',
  305. className: 'bpmn-icon-end-event-compensation',
  306. target: {
  307. type: 'bpmn:EndEvent',
  308. eventDefinitionType: 'bpmn:CompensateEventDefinition'
  309. }
  310. },
  311. {
  312. label: 'Signal end event',
  313. actionName: 'replace-with-signal-end',
  314. className: 'bpmn-icon-end-event-signal',
  315. target: {
  316. type: 'bpmn:EndEvent',
  317. eventDefinitionType: 'bpmn:SignalEventDefinition'
  318. }
  319. },
  320. {
  321. label: 'Terminate end event',
  322. actionName: 'replace-with-terminate-end',
  323. className: 'bpmn-icon-end-event-terminate',
  324. target: {
  325. type: 'bpmn:EndEvent',
  326. eventDefinitionType: 'bpmn:TerminateEventDefinition'
  327. }
  328. }
  329. ];
  330. /**
  331. * @type {ReplaceOption[]}
  332. */
  333. export var GATEWAY = [
  334. {
  335. label: 'Exclusive gateway',
  336. actionName: 'replace-with-exclusive-gateway',
  337. className: 'bpmn-icon-gateway-xor',
  338. target: {
  339. type: 'bpmn:ExclusiveGateway'
  340. }
  341. },
  342. {
  343. label: 'Parallel gateway',
  344. actionName: 'replace-with-parallel-gateway',
  345. className: 'bpmn-icon-gateway-parallel',
  346. target: {
  347. type: 'bpmn:ParallelGateway'
  348. }
  349. },
  350. {
  351. label: 'Inclusive gateway',
  352. actionName: 'replace-with-inclusive-gateway',
  353. className: 'bpmn-icon-gateway-or',
  354. target: {
  355. type: 'bpmn:InclusiveGateway'
  356. }
  357. },
  358. {
  359. label: 'Complex gateway',
  360. actionName: 'replace-with-complex-gateway',
  361. className: 'bpmn-icon-gateway-complex',
  362. target: {
  363. type: 'bpmn:ComplexGateway'
  364. }
  365. },
  366. {
  367. label: 'Event-based gateway',
  368. actionName: 'replace-with-event-based-gateway',
  369. className: 'bpmn-icon-gateway-eventbased',
  370. target: {
  371. type: 'bpmn:EventBasedGateway',
  372. instantiate: false,
  373. eventGatewayType: 'Exclusive'
  374. }
  375. }
  376. // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
  377. // {
  378. // label: 'Event based instantiating Gateway',
  379. // actionName: 'replace-with-exclusive-event-based-gateway',
  380. // className: 'bpmn-icon-exclusive-event-based',
  381. // target: {
  382. // type: 'bpmn:EventBasedGateway'
  383. // },
  384. // options: {
  385. // businessObject: { instantiate: true, eventGatewayType: 'Exclusive' }
  386. // }
  387. // },
  388. // {
  389. // label: 'Parallel Event based instantiating Gateway',
  390. // actionName: 'replace-with-parallel-event-based-instantiate-gateway',
  391. // className: 'bpmn-icon-parallel-event-based-instantiate-gateway',
  392. // target: {
  393. // type: 'bpmn:EventBasedGateway'
  394. // },
  395. // options: {
  396. // businessObject: { instantiate: true, eventGatewayType: 'Parallel' }
  397. // }
  398. // }
  399. ];
  400. /**
  401. * @type {ReplaceOption[]}
  402. */
  403. export var SUBPROCESS_EXPANDED = [
  404. {
  405. label: 'Transaction',
  406. actionName: 'replace-with-transaction',
  407. className: 'bpmn-icon-transaction',
  408. target: {
  409. type: 'bpmn:Transaction',
  410. isExpanded: true
  411. }
  412. },
  413. {
  414. label: 'Event sub-process',
  415. actionName: 'replace-with-event-subprocess',
  416. className: 'bpmn-icon-event-subprocess-expanded',
  417. target: {
  418. type: 'bpmn:SubProcess',
  419. triggeredByEvent: true,
  420. isExpanded: true
  421. }
  422. },
  423. {
  424. label: 'Sub-process (collapsed)',
  425. actionName: 'replace-with-collapsed-subprocess',
  426. className: 'bpmn-icon-subprocess-collapsed',
  427. target: {
  428. type: 'bpmn:SubProcess',
  429. isExpanded: false
  430. }
  431. }
  432. ];
  433. /**
  434. * @type {ReplaceOption[]}
  435. */
  436. export var TRANSACTION = [
  437. {
  438. label: 'Transaction',
  439. actionName: 'replace-with-transaction',
  440. className: 'bpmn-icon-transaction',
  441. target: {
  442. type: 'bpmn:Transaction',
  443. isExpanded: true
  444. }
  445. },
  446. {
  447. label: 'Sub-process',
  448. actionName: 'replace-with-subprocess',
  449. className: 'bpmn-icon-subprocess-expanded',
  450. target: {
  451. type: 'bpmn:SubProcess',
  452. isExpanded: true
  453. }
  454. },
  455. {
  456. label: 'Event sub-process',
  457. actionName: 'replace-with-event-subprocess',
  458. className: 'bpmn-icon-event-subprocess-expanded',
  459. target: {
  460. type: 'bpmn:SubProcess',
  461. triggeredByEvent: true,
  462. isExpanded: true
  463. }
  464. }
  465. ];
  466. /**
  467. * @type {ReplaceOption[]}
  468. */
  469. export var EVENT_SUB_PROCESS = TRANSACTION;
  470. /**
  471. * @type {ReplaceOption[]}
  472. */
  473. export var TASK = [
  474. {
  475. label: 'Task',
  476. actionName: 'replace-with-task',
  477. className: 'bpmn-icon-task',
  478. target: {
  479. type: 'bpmn:Task'
  480. }
  481. },
  482. {
  483. label: 'User task',
  484. actionName: 'replace-with-user-task',
  485. className: 'bpmn-icon-user',
  486. target: {
  487. type: 'bpmn:UserTask'
  488. }
  489. },
  490. {
  491. label: 'Service task',
  492. actionName: 'replace-with-service-task',
  493. className: 'bpmn-icon-service',
  494. target: {
  495. type: 'bpmn:ServiceTask'
  496. }
  497. },
  498. {
  499. label: 'Send task',
  500. actionName: 'replace-with-send-task',
  501. className: 'bpmn-icon-send',
  502. target: {
  503. type: 'bpmn:SendTask'
  504. }
  505. },
  506. {
  507. label: 'Receive task',
  508. actionName: 'replace-with-receive-task',
  509. className: 'bpmn-icon-receive',
  510. target: {
  511. type: 'bpmn:ReceiveTask'
  512. }
  513. },
  514. {
  515. label: 'Manual task',
  516. actionName: 'replace-with-manual-task',
  517. className: 'bpmn-icon-manual',
  518. target: {
  519. type: 'bpmn:ManualTask'
  520. }
  521. },
  522. {
  523. label: 'Business rule task',
  524. actionName: 'replace-with-rule-task',
  525. className: 'bpmn-icon-business-rule',
  526. target: {
  527. type: 'bpmn:BusinessRuleTask'
  528. }
  529. },
  530. {
  531. label: 'Script task',
  532. actionName: 'replace-with-script-task',
  533. className: 'bpmn-icon-script',
  534. target: {
  535. type: 'bpmn:ScriptTask'
  536. }
  537. },
  538. {
  539. label: 'Call activity',
  540. actionName: 'replace-with-call-activity',
  541. className: 'bpmn-icon-call-activity',
  542. target: {
  543. type: 'bpmn:CallActivity'
  544. }
  545. },
  546. {
  547. label: 'Sub-process (collapsed)',
  548. actionName: 'replace-with-collapsed-subprocess',
  549. className: 'bpmn-icon-subprocess-collapsed',
  550. target: {
  551. type: 'bpmn:SubProcess',
  552. isExpanded: false
  553. }
  554. },
  555. {
  556. label: 'Sub-process (expanded)',
  557. actionName: 'replace-with-expanded-subprocess',
  558. className: 'bpmn-icon-subprocess-expanded',
  559. target: {
  560. type: 'bpmn:SubProcess',
  561. isExpanded: true
  562. }
  563. }
  564. ];
  565. /**
  566. * @type {ReplaceOption[]}
  567. */
  568. export var DATA_OBJECT_REFERENCE = [
  569. {
  570. label: 'Data store reference',
  571. actionName: 'replace-with-data-store-reference',
  572. className: 'bpmn-icon-data-store',
  573. target: {
  574. type: 'bpmn:DataStoreReference'
  575. }
  576. }
  577. ];
  578. /**
  579. * @type {ReplaceOption[]}
  580. */
  581. export var DATA_STORE_REFERENCE = [
  582. {
  583. label: 'Data object reference',
  584. actionName: 'replace-with-data-object-reference',
  585. className: 'bpmn-icon-data-object',
  586. target: {
  587. type: 'bpmn:DataObjectReference'
  588. }
  589. }
  590. ];
  591. /**
  592. * @type {ReplaceOption[]}
  593. */
  594. export var BOUNDARY_EVENT = [
  595. {
  596. label: 'Message boundary event',
  597. actionName: 'replace-with-message-boundary',
  598. className: 'bpmn-icon-intermediate-event-catch-message',
  599. target: {
  600. type: 'bpmn:BoundaryEvent',
  601. eventDefinitionType: 'bpmn:MessageEventDefinition',
  602. cancelActivity: true
  603. }
  604. },
  605. {
  606. label: 'Timer boundary event',
  607. actionName: 'replace-with-timer-boundary',
  608. className: 'bpmn-icon-intermediate-event-catch-timer',
  609. target: {
  610. type: 'bpmn:BoundaryEvent',
  611. eventDefinitionType: 'bpmn:TimerEventDefinition',
  612. cancelActivity: true
  613. }
  614. },
  615. {
  616. label: 'Escalation boundary event',
  617. actionName: 'replace-with-escalation-boundary',
  618. className: 'bpmn-icon-intermediate-event-catch-escalation',
  619. target: {
  620. type: 'bpmn:BoundaryEvent',
  621. eventDefinitionType: 'bpmn:EscalationEventDefinition',
  622. cancelActivity: true
  623. }
  624. },
  625. {
  626. label: 'Conditional boundary event',
  627. actionName: 'replace-with-conditional-boundary',
  628. className: 'bpmn-icon-intermediate-event-catch-condition',
  629. target: {
  630. type: 'bpmn:BoundaryEvent',
  631. eventDefinitionType: 'bpmn:ConditionalEventDefinition',
  632. cancelActivity: true
  633. }
  634. },
  635. {
  636. label: 'Error boundary event',
  637. actionName: 'replace-with-error-boundary',
  638. className: 'bpmn-icon-intermediate-event-catch-error',
  639. target: {
  640. type: 'bpmn:BoundaryEvent',
  641. eventDefinitionType: 'bpmn:ErrorEventDefinition',
  642. cancelActivity: true
  643. }
  644. },
  645. {
  646. label: 'Cancel boundary event',
  647. actionName: 'replace-with-cancel-boundary',
  648. className: 'bpmn-icon-intermediate-event-catch-cancel',
  649. target: {
  650. type: 'bpmn:BoundaryEvent',
  651. eventDefinitionType: 'bpmn:CancelEventDefinition',
  652. cancelActivity: true
  653. }
  654. },
  655. {
  656. label: 'Signal boundary event',
  657. actionName: 'replace-with-signal-boundary',
  658. className: 'bpmn-icon-intermediate-event-catch-signal',
  659. target: {
  660. type: 'bpmn:BoundaryEvent',
  661. eventDefinitionType: 'bpmn:SignalEventDefinition',
  662. cancelActivity: true
  663. }
  664. },
  665. {
  666. label: 'Compensation boundary event',
  667. actionName: 'replace-with-compensation-boundary',
  668. className: 'bpmn-icon-intermediate-event-catch-compensation',
  669. target: {
  670. type: 'bpmn:BoundaryEvent',
  671. eventDefinitionType: 'bpmn:CompensateEventDefinition',
  672. cancelActivity: true
  673. }
  674. },
  675. {
  676. label: 'Message boundary event (non-interrupting)',
  677. actionName: 'replace-with-non-interrupting-message-boundary',
  678. className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
  679. target: {
  680. type: 'bpmn:BoundaryEvent',
  681. eventDefinitionType: 'bpmn:MessageEventDefinition',
  682. cancelActivity: false
  683. }
  684. },
  685. {
  686. label: 'Timer boundary event (non-interrupting)',
  687. actionName: 'replace-with-non-interrupting-timer-boundary',
  688. className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
  689. target: {
  690. type: 'bpmn:BoundaryEvent',
  691. eventDefinitionType: 'bpmn:TimerEventDefinition',
  692. cancelActivity: false
  693. }
  694. },
  695. {
  696. label: 'Escalation boundary event (non-interrupting)',
  697. actionName: 'replace-with-non-interrupting-escalation-boundary',
  698. className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
  699. target: {
  700. type: 'bpmn:BoundaryEvent',
  701. eventDefinitionType: 'bpmn:EscalationEventDefinition',
  702. cancelActivity: false
  703. }
  704. },
  705. {
  706. label: 'Conditional boundary event (non-interrupting)',
  707. actionName: 'replace-with-non-interrupting-conditional-boundary',
  708. className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
  709. target: {
  710. type: 'bpmn:BoundaryEvent',
  711. eventDefinitionType: 'bpmn:ConditionalEventDefinition',
  712. cancelActivity: false
  713. }
  714. },
  715. {
  716. label: 'Signal boundary event (non-interrupting)',
  717. actionName: 'replace-with-non-interrupting-signal-boundary',
  718. className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
  719. target: {
  720. type: 'bpmn:BoundaryEvent',
  721. eventDefinitionType: 'bpmn:SignalEventDefinition',
  722. cancelActivity: false
  723. }
  724. }
  725. ];
  726. /**
  727. * @type {ReplaceOption[]}
  728. */
  729. export var EVENT_SUB_PROCESS_START_EVENT = [
  730. {
  731. label: 'Message start event',
  732. actionName: 'replace-with-message-start',
  733. className: 'bpmn-icon-start-event-message',
  734. target: {
  735. type: 'bpmn:StartEvent',
  736. eventDefinitionType: 'bpmn:MessageEventDefinition',
  737. isInterrupting: true
  738. }
  739. },
  740. {
  741. label: 'Timer start event',
  742. actionName: 'replace-with-timer-start',
  743. className: 'bpmn-icon-start-event-timer',
  744. target: {
  745. type: 'bpmn:StartEvent',
  746. eventDefinitionType: 'bpmn:TimerEventDefinition',
  747. isInterrupting: true
  748. }
  749. },
  750. {
  751. label: 'Conditional start event',
  752. actionName: 'replace-with-conditional-start',
  753. className: 'bpmn-icon-start-event-condition',
  754. target: {
  755. type: 'bpmn:StartEvent',
  756. eventDefinitionType: 'bpmn:ConditionalEventDefinition',
  757. isInterrupting: true
  758. }
  759. },
  760. {
  761. label: 'Signal start event',
  762. actionName: 'replace-with-signal-start',
  763. className: 'bpmn-icon-start-event-signal',
  764. target: {
  765. type: 'bpmn:StartEvent',
  766. eventDefinitionType: 'bpmn:SignalEventDefinition',
  767. isInterrupting: true
  768. }
  769. },
  770. {
  771. label: 'Error start event',
  772. actionName: 'replace-with-error-start',
  773. className: 'bpmn-icon-start-event-error',
  774. target: {
  775. type: 'bpmn:StartEvent',
  776. eventDefinitionType: 'bpmn:ErrorEventDefinition',
  777. isInterrupting: true
  778. }
  779. },
  780. {
  781. label: 'Escalation start event',
  782. actionName: 'replace-with-escalation-start',
  783. className: 'bpmn-icon-start-event-escalation',
  784. target: {
  785. type: 'bpmn:StartEvent',
  786. eventDefinitionType: 'bpmn:EscalationEventDefinition',
  787. isInterrupting: true
  788. }
  789. },
  790. {
  791. label: 'Compensation start event',
  792. actionName: 'replace-with-compensation-start',
  793. className: 'bpmn-icon-start-event-compensation',
  794. target: {
  795. type: 'bpmn:StartEvent',
  796. eventDefinitionType: 'bpmn:CompensateEventDefinition',
  797. isInterrupting: true
  798. }
  799. },
  800. {
  801. label: 'Message start event (non-interrupting)',
  802. actionName: 'replace-with-non-interrupting-message-start',
  803. className: 'bpmn-icon-start-event-non-interrupting-message',
  804. target: {
  805. type: 'bpmn:StartEvent',
  806. eventDefinitionType: 'bpmn:MessageEventDefinition',
  807. isInterrupting: false
  808. }
  809. },
  810. {
  811. label: 'Timer start event (non-interrupting)',
  812. actionName: 'replace-with-non-interrupting-timer-start',
  813. className: 'bpmn-icon-start-event-non-interrupting-timer',
  814. target: {
  815. type: 'bpmn:StartEvent',
  816. eventDefinitionType: 'bpmn:TimerEventDefinition',
  817. isInterrupting: false
  818. }
  819. },
  820. {
  821. label: 'Conditional start event (non-interrupting)',
  822. actionName: 'replace-with-non-interrupting-conditional-start',
  823. className: 'bpmn-icon-start-event-non-interrupting-condition',
  824. target: {
  825. type: 'bpmn:StartEvent',
  826. eventDefinitionType: 'bpmn:ConditionalEventDefinition',
  827. isInterrupting: false
  828. }
  829. },
  830. {
  831. label: 'Signal start event (non-interrupting)',
  832. actionName: 'replace-with-non-interrupting-signal-start',
  833. className: 'bpmn-icon-start-event-non-interrupting-signal',
  834. target: {
  835. type: 'bpmn:StartEvent',
  836. eventDefinitionType: 'bpmn:SignalEventDefinition',
  837. isInterrupting: false
  838. }
  839. },
  840. {
  841. label: 'Escalation start event (non-interrupting)',
  842. actionName: 'replace-with-non-interrupting-escalation-start',
  843. className: 'bpmn-icon-start-event-non-interrupting-escalation',
  844. target: {
  845. type: 'bpmn:StartEvent',
  846. eventDefinitionType: 'bpmn:EscalationEventDefinition',
  847. isInterrupting: false
  848. }
  849. }
  850. ];
  851. /**
  852. * @type {ReplaceOption[]}
  853. */
  854. export var SEQUENCE_FLOW = [
  855. {
  856. label: 'Sequence flow',
  857. actionName: 'replace-with-sequence-flow',
  858. className: 'bpmn-icon-connection'
  859. },
  860. {
  861. label: 'Default flow',
  862. actionName: 'replace-with-default-flow',
  863. className: 'bpmn-icon-default-flow'
  864. },
  865. {
  866. label: 'Conditional flow',
  867. actionName: 'replace-with-conditional-flow',
  868. className: 'bpmn-icon-conditional-flow'
  869. }
  870. ];
  871. /**
  872. * @type {ReplaceOption[]}
  873. */
  874. export var PARTICIPANT = [
  875. {
  876. label: 'Expanded pool/participant',
  877. actionName: 'replace-with-expanded-pool',
  878. className: 'bpmn-icon-participant',
  879. target: {
  880. type: 'bpmn:Participant',
  881. isExpanded: true
  882. }
  883. },
  884. {
  885. label: function(element) {
  886. var label = 'Empty pool/participant';
  887. if (element.children && element.children.length) {
  888. label += ' (removes content)';
  889. }
  890. return label;
  891. },
  892. actionName: 'replace-with-collapsed-pool',
  893. // TODO(@janstuemmel): maybe design new icon
  894. className: 'bpmn-icon-lane',
  895. target: {
  896. type: 'bpmn:Participant',
  897. isExpanded: false
  898. }
  899. }
  900. ];