Skip to content
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: no outgoing from task #52

Merged
merged 1 commit into from
Sep 12, 2024
Merged

fix: no outgoing from task #52

merged 1 commit into from
Sep 12, 2024

Conversation

abdul99ahad
Copy link
Contributor

Closes #45

Proposed Changes

  • Task without outgoing sequence flow can exist.

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@@ -12,7 +12,7 @@ export default {
const nextElements = [];

const attachedOutgoing = (element.attachers || [])
.map(att => att.outgoing.reverse())
.map(att => (att.outgoing ? att.outgoing.reverse() : []))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Null object pattern, again:

Suggested change
.map(att => (att.outgoing ? att.outgoing.reverse() : []))
.map(attacher => (attacher.outgoing || []).reverse())

Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test case could be slightly "less verbose", but hey, it works as an integration test (checking many more things than needed for this example) now.

Do we actually use the tests and try to generate (and verify the generation succeeds)?

@abdul99ahad
Copy link
Contributor Author

abdul99ahad commented Aug 30, 2024

The test case could be slightly "less verbose", but hey, it works as an integration test (checking many more things than needed for this example) now.

Agreed.

Do we actually use the tests and try to generate (and verify the generation succeeds)?

Do you mean generating bpmn file from layout XML? We can also add test cases to generate the file.

@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Aug 30, 2024
@abdul99ahad abdul99ahad reopened this Aug 30, 2024
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Aug 30, 2024
@nikku nikku merged commit 8cbac2b into main Sep 12, 2024
5 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 12, 2024
@nikku nikku deleted the 45-no-outgoing-from-task branch September 12, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read properties of undefined (reading 'reverse')
2 participants