bpmnReplace.ts 22 KB

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