Skip to content

Unexpected Behavior of bpmn-engine When Using flow-extensions #4

Closed
@kovacsgergelydpr

Description

@kovacsgergelydpr

Hi there!

I would like to use bpmn-engine together with the @onify/flow-extensions package, but I encountered the following unexpected behavior:
When I register the extensions package in the engine, the await engine.execute() command does not wait synchronously for the UserTask instances to reach the wait status. Instead, it returns immediately after the StartEvent completes.

This makes state persistence problematic because calling execution.getState() still returns the state before reaching wait.

If I don't use the extensions package, everything continues to work as expected, just like in our previous implementations.

Please help me determine whether this is a bug or if I am not using the package correctly.
If this is the expected behavior, could you advise on which event handler I should use to wait for the parallel UserTasks to reach the 'wait' status so I can properly save the state?

I have created a StackBlitz project to make it easy to reproduce the issue:
https://stackblitz.com/edit/stackblitz-starters-3wpwgade?file=index.mjs

Thank you!
Gergely Kovács
DPR Ltd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions