From 10dc3b7db60a2e38f77de92fadd91beac5ff14c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Souchet?= Date: Wed, 30 Sep 2020 14:31:29 +0200 Subject: [PATCH] Fix id convention in model-complete-semantic.bpmn --- test/e2e/mxGraph.model.test.ts | 232 ++++--- .../bpmn/model-complete-semantic.bpmn | 654 +++++++++--------- 2 files changed, 462 insertions(+), 424 deletions(-) diff --git a/test/e2e/mxGraph.model.test.ts b/test/e2e/mxGraph.model.test.ts index 59a9f3bd5a..2dfc609a5d 100644 --- a/test/e2e/mxGraph.model.test.ts +++ b/test/e2e/mxGraph.model.test.ts @@ -237,29 +237,35 @@ describe('mxGraph model', () => { expectModelContainsPool('participant_4_id', { ...minimalPoolModelElement, label: 'Pool containing sublanes' }); // lane - expectModelContainsLane('Lane_1jf55v8', { ...minimalPoolModelElement, label: 'Lane with child lanes' }); - expectModelContainsLane('Lane_08b5s6x', { ...minimalPoolModelElement, label: 'Child Lane 1' }); - expectModelContainsLane('Lane_1vk6vro', { ...minimalPoolModelElement, label: 'Child lane 2' }); + expectModelContainsLane('lane_4_1_id', { ...minimalPoolModelElement, label: 'Lane with child lanes' }); + expectModelContainsLane('lane_4_1_1_id', { ...minimalPoolModelElement, label: 'Child Lane 1' }); + expectModelContainsLane('lane_4_1_2_id', { ...minimalPoolModelElement, label: 'Child Lane 2' }); + expectModelContainsLane('lane_4_2_id', { ...minimalPoolModelElement, label: 'Solo Lane' }); // start event - expectModelContainsBpmnEvent('startEvent_1', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.NONE, font: expectedBoldFont, label: 'Start Event' }); - expectModelContainsBpmnEvent('startEvent_2_timer', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Start Event' }); - expectModelContainsBpmnEvent('startEvent_2_timer_on_top', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Start Event On Top' }); - expectModelContainsBpmnEvent('startEvent_3_message', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message Start Event' }); - expectModelContainsBpmnEvent('startEvent_3_message_on_top', { + expectModelContainsBpmnEvent('start_event_none_id', { + kind: ShapeBpmnElementKind.EVENT_START, + eventKind: ShapeBpmnEventKind.NONE, + font: expectedBoldFont, + label: 'None Start Event', + }); + expectModelContainsBpmnEvent('start_event_timer_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Start Event' }); + expectModelContainsBpmnEvent('start_event_timer_on_top_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Start Event On Top' }); + expectModelContainsBpmnEvent('start_event_message_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message Start Event' }); + expectModelContainsBpmnEvent('start_event_message_on_top_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message Start Event On Top', }); - expectModelContainsBpmnEvent('startEvent_4_signal', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal Start Event' }); - expectModelContainsBpmnEvent('startEvent_4_signal_on_top', { + expectModelContainsBpmnEvent('start_event_signal_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal Start Event' }); + expectModelContainsBpmnEvent('start_event_signal_on_top_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal Start Event On Top', }); // end event - expectModelContainsBpmnEvent('terminateEndEvent', { + expectModelContainsBpmnEvent('end_event_terminate_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.TERMINATE, font: { @@ -272,7 +278,7 @@ describe('mxGraph model', () => { }, label: 'Terminate End Event', }); - expectModelContainsBpmnEvent('terminateEndEvent_on_top', { + expectModelContainsBpmnEvent('end_event_terminate_on_top_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.TERMINATE, font: { @@ -285,15 +291,15 @@ describe('mxGraph model', () => { }, label: 'Terminate End Event On Top', }); - expectModelContainsBpmnEvent('messageEndEvent', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message End Event' }); - expectModelContainsBpmnEvent('messageEndEvent_on_top', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message End Event On Top' }); - expectModelContainsBpmnEvent('signalEndEvent', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal End Event' }); - expectModelContainsBpmnEvent('signalEndEvent_on_top', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal End Event On Top' }); - expectModelContainsBpmnEvent('errorEndEvent', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.ERROR, label: 'Error End Event' }); - expectModelContainsBpmnEvent('errorEndEvent_on_top', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.ERROR, label: 'Error End Event On Top' }); + expectModelContainsBpmnEvent('end_event_message_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message End Event' }); + expectModelContainsBpmnEvent('end_event_message_on_top_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Message End Event On Top' }); + expectModelContainsBpmnEvent('end_event_signal_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal End Event' }); + expectModelContainsBpmnEvent('end_event_signal_on_top_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Signal End Event On Top' }); + expectModelContainsBpmnEvent('end_event_error_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.ERROR, label: 'Error End Event' }); + expectModelContainsBpmnEvent('end_event_error_on_top_id', { kind: ShapeBpmnElementKind.EVENT_END, eventKind: ShapeBpmnEventKind.ERROR, label: 'Error End Event On Top' }); // throw intermediate event - expectModelContainsBpmnEvent('noneIntermediateThrowEvent', { + expectModelContainsBpmnEvent('intermediate_throw_event_none_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.NONE, font: { @@ -306,74 +312,74 @@ describe('mxGraph model', () => { }, label: 'Throw None Intermediate Event', }); - expectModelContainsBpmnEvent('messageIntermediateThrowEvent', { + expectModelContainsBpmnEvent('intermediate_throw_event_message_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Throw Message Intermediate Event', }); - expectModelContainsBpmnEvent('messageIntermediateThrowEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_throw_event_message_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Throw Message Intermediate Event On Top', }); - expectModelContainsBpmnEvent('signalIntermediateThrowEvent', { + expectModelContainsBpmnEvent('intermediate_throw_event_signal_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Throw Signal Intermediate Event', }); - expectModelContainsBpmnEvent('signalIntermediateThrowEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_throw_event_signal_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Throw Signal Intermediate Event On Top', }); - expectModelContainsBpmnEvent('linkIntermediateThrowEvent', { + expectModelContainsBpmnEvent('intermediate_throw_event_link_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.LINK, label: 'Throw Link Intermediate Event', }); - expectModelContainsBpmnEvent('linkIntermediateThrowEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_throw_event_link_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW, eventKind: ShapeBpmnEventKind.LINK, label: 'Throw Link Intermediate Event On Top', }); // catch intermediate event - expectModelContainsBpmnEvent('messageIntermediateCatchEvent', { + expectModelContainsBpmnEvent('intermediate_catch_event_message_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Catch Message Intermediate Event', }); - expectModelContainsBpmnEvent('messageIntermediateCatchEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_catch_event_message_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.MESSAGE, label: 'Catch Message Intermediate Event On Top', }); - expectModelContainsBpmnEvent('IntermediateCatchEvent_Timer_01', { + expectModelContainsBpmnEvent('intermediate_catch_event_timer_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Intermediate Catch Event', }); - expectModelContainsBpmnEvent('IntermediateCatchEvent_Timer_01_on_top', { + expectModelContainsBpmnEvent('intermediate_catch_event_timer_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.TIMER, label: 'Timer Intermediate Catch Event On Top', }); - expectModelContainsBpmnEvent('signalIntermediateCatchEvent', { + expectModelContainsBpmnEvent('intermediate_catch_event_signal_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Catch Signal Intermediate Event', }); - expectModelContainsBpmnEvent('signalIntermediateCatchEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_catch_event_signal_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.SIGNAL, label: 'Catch Signal Intermediate Event On Top', }); - expectModelContainsBpmnEvent('linkIntermediateCatchEvent', { + expectModelContainsBpmnEvent('intermediate_catch_event_link_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.LINK, label: 'Catch Link Intermediate Event', }); - expectModelContainsBpmnEvent('linkIntermediateCatchEvent_on_top', { + expectModelContainsBpmnEvent('intermediate_catch_event_link_on_top_id', { kind: ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH, eventKind: ShapeBpmnEventKind.LINK, label: 'Catch Link Intermediate Event On Top', @@ -384,49 +390,49 @@ describe('mxGraph model', () => { kind: null, eventKind: ShapeBpmnEventKind.MESSAGE, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Message', + label: 'Interrupting Message Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_message_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.MESSAGE, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Message On Top', + label: 'Interrupting Message Boundary Intermediate Event On Top', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_timer_id', { kind: null, eventKind: ShapeBpmnEventKind.TIMER, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Timer', + label: 'Interrupting Timer Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_timer_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.TIMER, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Timer On Top', + label: 'Interrupting Timer Boundary Intermediate Event On Top', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_signal_id', { kind: null, eventKind: ShapeBpmnEventKind.SIGNAL, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Signal', + label: 'Interrupting Signal Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_signal_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.SIGNAL, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Signal On Top', + label: 'Interrupting Signal Boundary Intermediate Event On Top', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_error_id', { kind: null, eventKind: ShapeBpmnEventKind.ERROR, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Error', + label: 'Interrupting Error Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_interrupting_error_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.ERROR, isInterrupting: true, - label: 'Boundary Intermediate Event Interrupting Error On Top', + label: 'Interrupting Error Boundary Intermediate Event On Top', }); // boundary event: non-interrupting @@ -434,37 +440,37 @@ describe('mxGraph model', () => { kind: null, eventKind: ShapeBpmnEventKind.MESSAGE, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Message', + label: 'Non-interrupting Message Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_non_interrupting_message_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.MESSAGE, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Message On Top', + label: 'Non-interrupting Message Boundary Intermediate Event On Top', }); expectModelContainsBpmnBoundaryEvent('boundary_event_non_interrupting_timer_id', { kind: null, eventKind: ShapeBpmnEventKind.TIMER, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Timer', + label: 'Non-interrupting Timer Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_non_interrupting_timer_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.TIMER, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Timer On Top', + label: 'Non-interrupting Timer Boundary Intermediate Event On Top', }); expectModelContainsBpmnBoundaryEvent('boundary_event_non_interrupting_signal_id', { kind: null, eventKind: ShapeBpmnEventKind.SIGNAL, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Signal', + label: 'Non-interrupting Signal Boundary Intermediate Event', }); expectModelContainsBpmnBoundaryEvent('boundary_event_non_interrupting_signal_on_top_id', { kind: null, eventKind: ShapeBpmnEventKind.SIGNAL, isInterrupting: false, - label: 'Boundary Intermediate Event Non-interrupting Signal On Top', + label: 'Non-interrupting Signal Boundary Intermediate Event On Top', }); // Sub-process @@ -567,71 +573,81 @@ describe('mxGraph model', () => { }); // Elements in subprocess - expectModelContainsShape('expanded_embedded_sub_process_id_startEvent_1', { + expectModelContainsShape('start_event_in_sub_process_id', { kind: ShapeBpmnElementKind.EVENT_START, - label: 'start event subprocess', + label: 'Start Event In Sub-Process', parentId: 'expanded_embedded_sub_process_id', }); - expectModelContainsShape('expanded_embedded_sub_process_id_task_1', { + expectModelContainsShape('task_in_sub_process_id', { kind: ShapeBpmnElementKind.TASK, - label: 'Task in subprocess', + label: 'Task In Sub-Process', parentId: 'expanded_embedded_sub_process_id', }); - expectModelContainsShape('expanded_embedded_sub_process_id_endEvent_1', { + expectModelContainsShape('end_event_in_sub_process_id', { kind: ShapeBpmnElementKind.EVENT_END, - label: 'end event subprocess', + label: 'End Event In Sub-Process', parentId: 'expanded_embedded_sub_process_id', }); - expectModelContainsEdge('expanded_embedded_sub_process_id_SeqFlow_1', { + expectModelContainsEdge('sequence_flow_in_sub_process_1_id', { kind: FlowKind.SEQUENCE_FLOW, parentId: 'expanded_embedded_sub_process_id', }); - expectModelContainsEdge('expanded_embedded_sub_process_id_SeqFlow_2', { + expectModelContainsEdge('sequence_flow_in_sub_process_2_id', { kind: FlowKind.SEQUENCE_FLOW, parentId: 'expanded_embedded_sub_process_id', }); // Start Event in Event Sub Process - expectModelContainsBpmnStartEvent('expanded_event_sub_process_with_non_interrupting_start_event_id_startEvent_1', { + // Interrupting Start Event + + // Non-interrupting Start Event + expectModelContainsBpmnStartEvent('start_event_non_interrupting_timer_id', { + kind: ShapeBpmnElementKind.EVENT_START, + eventKind: ShapeBpmnEventKind.TIMER, + label: 'Non-interrupting Timer Start Event In Sub-Process', + parentId: 'expanded_event_sub_process_with_start_events_id', + isInterrupting: false, + }); + expectModelContainsBpmnStartEvent('start_event_non_interrupting_timer_on_top_id', { kind: ShapeBpmnElementKind.EVENT_START, eventKind: ShapeBpmnEventKind.TIMER, - label: 'non-interrupting start event in subprocess', - parentId: 'expanded_event_sub_process_with_non_interrupting_start_event_id', + label: 'Non-interrupting Timer Start Event On Top In Sub-Process', + parentId: 'expanded_event_sub_process_with_start_events_id', isInterrupting: false, }); // Call Activity calling process // Expanded - expectModelContainsShape('expanded_callActivity_1', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Expanded Call Activity' }); - expectModelContainsShape('expanded_callActivity_with_loop', { + expectModelContainsShape('expanded_call_activity_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Expanded Call Activity' }); + expectModelContainsShape('expanded_call_activity_with_loop_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Expanded Call Activity With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('expanded_callActivity_with_sequential_multi_instance', { + expectModelContainsShape('expanded_call_activity_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Expanded Call Activity With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('expanded_callActivity_with_parallel_multi_instance', { + expectModelContainsShape('expanded_call_activity_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Expanded Call Activity With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); // Collapsed - expectModelContainsShape('collapsed_callActivity_1', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Collapsed Call Activity' }); - expectModelContainsShape('collapsed_callActivity_with_loop', { + expectModelContainsShape('collapsed_call_activity_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Collapsed Call Activity' }); + expectModelContainsShape('collapsed_call_activity_with_loop_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Collapsed Call Activity With Loop', markers: [ShapeBpmnMarkerKind.LOOP, ShapeBpmnMarkerKind.EXPAND], }); - expectModelContainsShape('collapsed_callActivity_with_sequential_multi_instance', { + expectModelContainsShape('collapsed_call_activity_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Collapsed Call Activity With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL, ShapeBpmnMarkerKind.EXPAND], }); - expectModelContainsShape('collapsed_callActivity_with_parallel_multi_instance', { + expectModelContainsShape('collapsed_call_activity_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.CALL_ACTIVITY, label: 'Collapsed Call Activity With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL, ShapeBpmnMarkerKind.EXPAND], @@ -639,7 +655,7 @@ describe('mxGraph model', () => { // activity // Task - expectModelContainsShape('task_1', { + expectModelContainsShape('task_id', { kind: ShapeBpmnElementKind.TASK, font: { isBold: false, @@ -649,9 +665,9 @@ describe('mxGraph model', () => { name: 'Arial', size: 11.0, }, - label: 'Task 1', + label: 'Task', }); - expectModelContainsShape('task_with_loop', { + expectModelContainsShape('task_with_loop_id', { kind: ShapeBpmnElementKind.TASK, font: { isBold: false, @@ -664,7 +680,7 @@ describe('mxGraph model', () => { label: 'Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('task_with_sequential_multi_instance', { + expectModelContainsShape('task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK, font: { isBold: false, @@ -677,7 +693,7 @@ describe('mxGraph model', () => { label: 'Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('task_with_parallel_multi_instance', { + expectModelContainsShape('task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK, font: { isBold: false, @@ -692,20 +708,20 @@ describe('mxGraph model', () => { }); // Service Task - expectModelContainsShape('serviceTask_2', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task 2' }); - expectModelContainsShape('serviceTask_with_loop', { + expectModelContainsShape('service_task_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task' }); + expectModelContainsShape('service_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('serviceTask_with_sequential_multi_instance', { + expectModelContainsShape('service_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('serviceTask_with_parallel_multi_instance', { + expectModelContainsShape('service_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task With Parallel Multi-instance', @@ -713,20 +729,20 @@ describe('mxGraph model', () => { }); // User Task - expectModelContainsShape('userTask_3', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task 3' }); - expectModelContainsShape('userTask_with_loop', { + expectModelContainsShape('user_task_id', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task' }); + expectModelContainsShape('user_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('userTask_with_sequential_multi_instance', { + expectModelContainsShape('user_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('userTask_with_parallel_multi_instance', { + expectModelContainsShape('user_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task With Parallel Multi-instance', @@ -734,20 +750,20 @@ describe('mxGraph model', () => { }); // Receive Task: Non instantiating - expectModelContainsShape('receiveTask_non_instantiating', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Non-instantiating Receive Task', isInstantiating: false }); - expectModelContainsShape('receiveTask_non_instantiating_with_loop', { + expectModelContainsShape('receive_task_non_instantiating_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Non-instantiating Receive Task', isInstantiating: false }); + expectModelContainsShape('receive_task_non_instantiating_with_loop_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Non-instantiating Receive Task With Loop', isInstantiating: false, markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('receiveTask_non_instantiating_with_sequential_multi_instance', { + expectModelContainsShape('receive_task_non_instantiating_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Non-instantiating Receive Task With Sequential Multi-instance', isInstantiating: false, markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('receiveTask_non_instantiating_with_parallel_multi_instance', { + expectModelContainsShape('receive_task_non_instantiating_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Non-instantiating Receive Task With Parallel Multi-instance', isInstantiating: false, @@ -755,20 +771,20 @@ describe('mxGraph model', () => { }); // Receive Task: Instantiating - expectModelContainsShape('receiveTask_instantiating', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Instantiating Receive Task', isInstantiating: true }); - expectModelContainsShape('receiveTask_instantiating_with_loop', { + expectModelContainsShape('receive_task_instantiating_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Instantiating Receive Task', isInstantiating: true }); + expectModelContainsShape('receive_task_instantiating_with_loop_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Instantiating Receive Task With Loop', isInstantiating: true, markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('receiveTask_instantiating_with_sequential_multi_instance', { + expectModelContainsShape('receive_task_instantiating_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Instantiating Receive Task With Sequential Multi-instance', isInstantiating: true, markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('receiveTask_instantiating_with_parallel_multi_instance', { + expectModelContainsShape('receive_task_instantiating_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_RECEIVE, label: 'Instantiating Receive Task With Parallel Multi-instance', isInstantiating: true, @@ -776,20 +792,20 @@ describe('mxGraph model', () => { }); // Send Task - expectModelContainsShape('sendTask', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task' }); - expectModelContainsShape('sendTask_with_loop', { + expectModelContainsShape('send_task_id', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task' }); + expectModelContainsShape('send_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('sendTask_with_sequential_multi_instance', { + expectModelContainsShape('send_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('sendTask_with_parallel_multi_instance', { + expectModelContainsShape('send_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task With Parallel Multi-instance', @@ -797,20 +813,20 @@ describe('mxGraph model', () => { }); // Manual Task - expectModelContainsShape('manualTask', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task' }); - expectModelContainsShape('manualTask_with_loop', { + expectModelContainsShape('manual_task_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task' }); + expectModelContainsShape('manual_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('manualTask_with_sequential_multi_instance', { + expectModelContainsShape('manual_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('manualTask_with_parallel_multi_instance', { + expectModelContainsShape('manual_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task With Parallel Multi-instance', @@ -818,20 +834,20 @@ describe('mxGraph model', () => { }); // Script Task - expectModelContainsShape('scriptTask', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task' }); - expectModelContainsShape('scriptTask_with_loop', { + expectModelContainsShape('script_task_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task' }); + expectModelContainsShape('script_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('scriptTask_with_sequential_multi_instance', { + expectModelContainsShape('script_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('scriptTask_with_parallel_multi_instance', { + expectModelContainsShape('script_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task With Parallel Multi-instance', @@ -839,20 +855,20 @@ describe('mxGraph model', () => { }); // Business Rule Task - expectModelContainsShape('businessRuleTask', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task' }); - expectModelContainsShape('businessRuleTask_with_loop', { + expectModelContainsShape('business_rule_task_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task' }); + expectModelContainsShape('business_rule_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); - expectModelContainsShape('businessRuleTask_with_sequential_multi_instance', { + expectModelContainsShape('business_rule_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); - expectModelContainsShape('businessRuleTask_with_parallel_multi_instance', { + expectModelContainsShape('business_rule_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task With Parallel Multi-instance', @@ -860,12 +876,12 @@ describe('mxGraph model', () => { }); // text annotation - expectModelContainsShape('text_annotation_id_1', { kind: ShapeBpmnElementKind.TEXT_ANNOTATION, label: 'Annotation' }); + expectModelContainsShape('text_annotation_id', { kind: ShapeBpmnElementKind.TEXT_ANNOTATION, label: 'Annotation' }); // gateways - expectModelContainsShape('inclusiveGateway_1', { kind: ShapeBpmnElementKind.GATEWAY_INCLUSIVE, label: 'Inclusive Gateway 1' }); - expectModelContainsShape('parallelGateway', { kind: ShapeBpmnElementKind.GATEWAY_PARALLEL, label: 'Parallel Gateway' }); - expectModelContainsShape('exclusiveGateway', { kind: ShapeBpmnElementKind.GATEWAY_EXCLUSIVE, label: 'Exclusive Gateway' }); + expectModelContainsShape('inclusive_gateway_id', { kind: ShapeBpmnElementKind.GATEWAY_INCLUSIVE, label: 'Inclusive Gateway' }); + expectModelContainsShape('parallel_gateway_id', { kind: ShapeBpmnElementKind.GATEWAY_PARALLEL, label: 'Parallel Gateway' }); + expectModelContainsShape('exclusive_gateway_id', { kind: ShapeBpmnElementKind.GATEWAY_EXCLUSIVE, label: 'Exclusive Gateway' }); // sequence flow expectModelContainsSequenceFlow('default_sequence_flow_id', { sequenceFlowKind: SequenceFlowKind.DEFAULT, startArrow: MarkerIdentifier.ARROW_DASH, font: expectedBoldFont }); @@ -885,7 +901,7 @@ describe('mxGraph model', () => { expectModelContainsMessageFlow('message_flow_no_visible_id', { label: 'Message Flow without message', messageVisibleKind: MessageVisibleKind.NONE }); // association - expectModelContainsAssociationFlow('association_id_1', { kind: FlowKind.ASSOCIATION_FLOW }); + expectModelContainsAssociationFlow('association_id', { kind: FlowKind.ASSOCIATION_FLOW }); }); it('bpmn elements should not be available in the mxGraph model, if they are attached to not existing elements', async () => { diff --git a/test/fixtures/bpmn/model-complete-semantic.bpmn b/test/fixtures/bpmn/model-complete-semantic.bpmn index 000db5d18d..fcc7632d2b 100644 --- a/test/fixtures/bpmn/model-complete-semantic.bpmn +++ b/test/fixtures/bpmn/model-complete-semantic.bpmn @@ -1,17 +1,17 @@ - - - + + + - - + + - + - - - + + + @@ -22,169 +22,170 @@ - - + + + - + top_message_definition_id - + - - + + - + - + - - + + - + - + - + normal_sequence_flow_id default_sequence_flow_id conditional_sequence_flow_from_activity_id - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - expanded_embedded_sub_process_id_SeqFlow_1 + + sequence_flow_in_sub_process_1_id - - expanded_embedded_sub_process_id_SeqFlow_1 - expanded_embedded_sub_process_id_SeqFlow_2 + + sequence_flow_in_sub_process_1_id + sequence_flow_in_sub_process_2_id - - - expanded_embedded_sub_process_id_SeqFlow_2 + + + sequence_flow_in_sub_process_2_id - + @@ -220,10 +221,16 @@ - - + + + + + + + top_timer_definition_id + @@ -240,150 +247,150 @@ - - + + - + top_timer_definition_id - + - + top_message_definition_id - + - + top_signal_definition_id - + - + top_message_definition_id - + - + top_timer_definition_id - + - + top_signal_definition_id - + - + top_error_definition_id - + - + top_message_definition_id - + - + top_timer_definition_id - + - + top_signal_definition_id - - + + - + top_message_definition_id - + - + top_signal_definition_id - + - + top_link_definition_id - + - + top_message_definition_id - + - + top_timer_definition_id - + - + top_signal_definition_id - + - + top_link_definition_id - + - + top_terminate_definition_id - + - + top_message_definition_id - + - + top_signal_definition_id - + - + top_error_definition_id - - - - + + + + normal_sequence_flow_id default_sequence_flow_id conditional_sequence_flow_from_activity_id @@ -391,61 +398,63 @@ - + Annotation - - - + + + "Contract to be written".equals(loanRequested.status) - + "Contract to be written".equals(loanRequested.status) - + - - - - - - + + + + + + - - + � + - - + + + + - + - + - + - + - + @@ -453,25 +462,25 @@ - + - + - + - + @@ -479,217 +488,217 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + @@ -697,27 +706,27 @@ - + - + - + - + - + - + @@ -725,107 +734,120 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + @@ -833,43 +855,43 @@ - + - + - + - + - + - + - + - + @@ -877,49 +899,49 @@ - + - + - + - + - + - + - + - + @@ -927,49 +949,49 @@ - + - + - + - + - + - + - + - + - + - + @@ -977,49 +999,49 @@ - + - + - + - + - + - + - + - + @@ -1027,37 +1049,37 @@ - + - + - + - + - + - + @@ -1065,25 +1087,25 @@ - + - + - + - + @@ -1091,13 +1113,13 @@ - + - + @@ -1106,21 +1128,21 @@ - + - + - + - + @@ -1128,25 +1150,25 @@ - - - - + + + + - + - + - + @@ -1159,35 +1181,35 @@ - + - + - + - + - + - + - + - + - +