Giter Club home page Giter Club logo

Comments (6)

paed01 avatar paed01 commented on July 21, 2024

I’ll have a look.

from bpmn-elements.

paed01 avatar paed01 commented on July 21, 2024

The joinGateway is an exclusive gateway. Is this intentional? Doesn't affect your discovery, but the execution differs if you actually wait for both the service task and catch error event before continuing.

I've tried to replicate the flow to get the visuals. Is this close:
issue-31

from bpmn-elements.

captHarlock69 avatar captHarlock69 commented on July 21, 2024

Well, as far as I know an exclusive gateway is better since the the two incoming paths cannot occur (the request is succesful or an error happens).

In the test I added a "dumpState" function that dumps the queue status on console. There you can check the different queue status. As far as I understood the difference is that, when an asynchronous (a REST call, or a timeout as in the example) call is made the internal flow reaches down to the process, here the process waits for the two remaining messages to be consumed (the error and the task) and the whole message history is cleaned up (only "leave" messages and the error one is left).

If the call is synchronous (so that a simple call to the callback) the queueing system returns to a higher level and the message history is not cleaned up.

As an end result in the first case when the state is recovered the definition throws an error maybe because in the state message queue there is no evidence of the whole history, while in the second case the process is resumed at the correct point. but this is just guessing, debugging the queueing system is not that easy to me and this is the "finest" (so to speach) level I could get.

from bpmn-elements.

paed01 avatar paed01 commented on July 21, 2024

If you use a parallel gateway the gateway will wait for both sequence flows before continuing. One is taken and the other is discarded. When both flows have been touched (taken/discarded) the parallel gateway will complete and take the outbound flow. Once.

The exclusive gateway will behave as any other activity, it will take action on all inbound sequence flows. The discarded sequence flow will touch all downstream flows until it reaches an end or is looped. The taken sequence flow will still do stuff as intended.

So, it's just a matter of offloading the engine of doing unnecessary work.

from bpmn-elements.

paed01 avatar paed01 commented on July 21, 2024

Thank you for uncovering this issue. I believe i managed to fix it.

from bpmn-elements.

captHarlock69 avatar captHarlock69 commented on July 21, 2024

Thank you for uncovering this issue. I believe i managed to fix it.

apologize for late feedback. I do confirm that bpmn-engine/elements runs as expected and issue does not happen.

thanks.

from bpmn-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.