-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix: remove extra parsing of lane elements which are not in the BPMN spec #2805
Changes from all commits
98b5a06
ee7e9ca
b1e2366
96d31d7
1ed1609
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,9 +70,9 @@ const computeSubProcessKind = (processedSemanticType: BpmnSemanticType, bpmnElem | |
} | ||
}; | ||
|
||
const orderedFlowNodeBpmnTypes: BpmnSemanticType[] = ['adHocSubProcess', 'transaction'] // specific management for adhoc and transaction sub-processes which are handled with a dedicated ShapeBpmnSubProcessKind | ||
const orderedFlowNodeBpmnTypes: BpmnSemanticType[] = (['adHocSubProcess', 'transaction'] as BpmnSemanticType[]) // specific management for adhoc and transaction sub-processes which are handled with a dedicated ShapeBpmnSubProcessKind | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Same question as in EventDefinitionConverter.ts about switching the syntax to "as". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same answer, TypeScript send an error due to the removing of |
||
// process boundary events afterward as we need its parent activity to be available when building it | ||
.concat(ShapeUtil.flowNodeKinds().filter(kind => kind != ShapeBpmnElementKind.EVENT_BOUNDARY)) | ||
.concat(ShapeUtil.flowNodeKinds().filter(kind => kind != ShapeBpmnElementKind.EVENT_BOUNDARY) as BpmnSemanticType[]) | ||
.concat([ShapeBpmnElementKind.EVENT_BOUNDARY]); | ||
|
||
function getShapeBpmnElementKind(bpmnSemanticType: BpmnSemanticType): ShapeBpmnElementKind { | ||
|
@@ -152,7 +152,6 @@ export default class ProcessConverter { | |
// flow nodes | ||
orderedFlowNodeBpmnTypes.forEach(bpmnType => this.buildFlowNodeBpmnElements(process[bpmnType], getShapeBpmnElementKind(bpmnType), parentId, process.id, bpmnType)); | ||
// containers | ||
this.buildLaneBpmnElements(process[ShapeBpmnElementKind.LANE], parentId, process.id); | ||
this.buildLaneSetBpmnElements(process.laneSet, parentId, process.id); | ||
|
||
// flows | ||
|
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.
question: It is fine to introduce the new type as the code is now easier to read IMHO.
However, I don't understand why switching the syntax to "as"? I suggest to keep the existing it and to set an eslint rules to enforce this as part of #2742.
These are clearly extra changes. During my review, I had to wonder if this was part of the correction. So I guess if I or anyone else reads this in the future, the same question will arise.
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.
I do it, because is not working with the last syntax due to the remove of
[key:string]:any
🙂