feat: add more data in the internal model for the link events#2924
Merged
tbouffard merged 7 commits intoOct 13, 2023
Merged
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 |
csouchet
commented
Oct 12, 2023
| ['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}`, () => { |
Contributor
Author
There was a problem hiding this comment.
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
}
}
]
}
}
}
}
csouchet
commented
Oct 12, 2023
| }); | ||
| }); | ||
|
|
||
| it(`should convert with several sources, ${titleSuffix}`, () => { |
Contributor
Author
There was a problem hiding this comment.
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! |
tbouffard
approved these changes
Oct 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Add
sourceIds&targetIdproperties 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