-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add more data in the internal model for the link events #2924
feat: add more data in the internal model for the link events #2924
Conversation
♻️ PR Preview 5c42362 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
♻️ PR Preview 5c42362 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
['event with eventDefinitionRef attribute', EventDefinitionOn.DEFINITIONS], | ||
['event with eventDefinition object', EventDefinitionOn.EVENT], | ||
] as [string, EventDefinitionOn][])(`%s`, (titleSuffix: string, eventDefinitionOn: EventDefinitionOn) => { | ||
it(`should convert with one source and one target, ${titleSuffix}`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On definitions
{
"definitions": {
"targetNamespace": "",
"collaboration": {
"id": "collaboration_id_0"
},
"process": {
"id": "0",
"intermediateThrowEvent": {
"id": "source_id",
"eventDefinitionRef": "link_source_id"
},
"intermediateCatchEvent": {
"id": "target_id",
"eventDefinitionRef": "link_target_id"
}
},
"BPMNDiagram": {
"name": "process 0",
"BPMNPlane": {
"BPMNShape": [
{
"id": "shape_source_id",
"bpmnElement": "source_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_target_id",
"bpmnElement": "target_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
}
]
}
},
"linkEventDefinition": [
{
"id": "link_source_id",
"target": "link_target_id"
},
{
"id": "link_target_id",
"source": "link_source_id"
}
]
}
}
On event
{
"definitions": {
"targetNamespace": "",
"collaboration": {
"id": "collaboration_id_0"
},
"process": {
"id": "0",
"intermediateThrowEvent": {
"id": "source_id",
"linkEventDefinition": {
"id": "link_source_id",
"target": "link_target_id"
}
},
"intermediateCatchEvent": {
"id": "target_id",
"linkEventDefinition": {
"id": "link_target_id",
"source": "link_source_id"
}
}
},
"BPMNDiagram": {
"name": "process 0",
"BPMNPlane": {
"BPMNShape": [
{
"id": "shape_source_id",
"bpmnElement": "source_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_target_id",
"bpmnElement": "target_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
}
]
}
}
}
}
}); | ||
}); | ||
|
||
it(`should convert with several sources, ${titleSuffix}`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On definitions
{
"definitions": {
"targetNamespace": "",
"collaboration": {
"id": "collaboration_id_0"
},
"process": {
"id": "0",
"intermediateThrowEvent": [
{
"id": "source_1_id",
"eventDefinitionRef": "link_source_1_id"
},
{
"id": "source_2_id",
"eventDefinitionRef": "link_source_2_id"
}
],
"intermediateCatchEvent": {
"id": "target_id",
"eventDefinitionRef": "link_target_id"
}
},
"BPMNDiagram": {
"name": "process 0",
"BPMNPlane": {
"BPMNShape": [
{
"id": "shape_source_1_id",
"bpmnElement": "source_1_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_source_2_id",
"bpmnElement": "source_2_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_target_id",
"bpmnElement": "target_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
}
]
}
},
"linkEventDefinition": [
{
"id": "link_source_1_id",
"target": "link_target_id"
},
{
"id": "link_source_2_id",
"target": "link_target_id"
},
{
"id": "link_target_id",
"source": [
"link_source_1_id",
"link_source_2_id"
]
}
]
}
}
On event
{
"definitions": {
"targetNamespace": "",
"collaboration": {
"id": "collaboration_id_0"
},
"process": {
"id": "0",
"intermediateThrowEvent": [
{
"id": "source_1_id",
"linkEventDefinition": {
"id": "link_source_1_id",
"target": "link_target_id"
}
},
{
"id": "source_2_id",
"linkEventDefinition": {
"id": "link_source_2_id",
"target": "link_target_id"
}
}
],
"intermediateCatchEvent": {
"id": "target_id",
"linkEventDefinition": {
"id": "link_target_id",
"source": [
"link_source_1_id",
"link_source_2_id"
]
}
}
},
"BPMNDiagram": {
"name": "process 0",
"BPMNPlane": {
"BPMNShape": [
{
"id": "shape_source_1_id",
"bpmnElement": "source_1_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_source_2_id",
"bpmnElement": "source_2_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
},
{
"id": "shape_target_id",
"bpmnElement": "target_id",
"Bounds": {
"x": 362,
"y": 232,
"width": 36,
"height": 45
}
}
]
}
}
}
}
- ShapeBpmnIntermediateCatchEvent with 'sourceIds' property - ShapeBpmnIntermediateThrowEvent with 'targetId' property
55a6864
to
5c42362
Compare
Kudos, SonarCloud Quality Gate passed! |
Add
sourceIds
&targetId
properties in the internal model for the link events.ℹ️ In the BPMN specification, the link event definition can refer to another link event definition as either a source or a target.
Since the user of the library doesn't have this information, we internally calculate the ID of the event associated with this other link event definition to set as either source or target in
ShapeBpmnSemantic
.Covers #2855