Giter Club home page Giter Club logo

Comments (5)

paed01 avatar paed01 commented on July 21, 2024

I was unable to reproduce the behavior in the referenced test in the latest version. Which is a good thing. But it could also mean that I got it all wrong...

The engine is updated with the new bpmn-elements version. Can you have another go?

If you have a working version of LinkEvent? I would happily accept a PR.

from bpmn-elements.

jonklein avatar jonklein commented on July 21, 2024

I might be doing something wrong, but I was able to reproduce it in the latest version of the engine. Attached is the BPMN file, and below are the logs. The process expects environment.services.log to log out text - I expect to see task1 and task2 logged, but I only get task1.

  bpmn-engine:engine <./examples/link.bpmn> execute +0ms
  bpmn-engine:bpmn:definitions <Definitions_18a4j13> enter +0ms
  bpmn-engine:bpmn:definitions <Definitions_18a4j13> start +0ms
  bpmn-engine:bpmn:definitions <Definitions_18a4j13> found 1 processes +3ms
  bpmn-engine:bpmn:definitions <Definitions_18a4j13_3a9d8cc6 (Definitions_18a4j13)> execute definition +1ms
  bpmn-engine:bpmn:process <Process_0pkt3xj> initialized with executionId <Process_0pkt3xj_1445b30c> +0ms
  bpmn-engine:bpmn:process <Process_0pkt3xj> enter +1ms
  bpmn-engine:bpmn:process <Process_0pkt3xj> start +0ms
  bpmn-engine:bpmn:sequenceflow <SequenceFlow_1uguq0y> init, <StartEvent_1> -> <Task_1eq3n1s> +0ms
  bpmn-engine:bpmn:sequenceflow <SequenceFlow_1xz232n> init, <Task_1eq3n1s> -> <IntermediateThrowEvent_0wbsqd7> +0ms
  bpmn-engine:bpmn:sequenceflow <SequenceFlow_13btpcm> init, <IntermediateThrowEvent_023keng> -> <Task_1ldwx43> +0ms
  bpmn-engine:bpmn:process <Process_0pkt3xj_1445b30c (Process_0pkt3xj)> execute process +24ms
  bpmn-engine:bpmn:startevent <StartEvent_1> initialized with executionId <StartEvent_1_3784e097> +0ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng> initialized with executionId <IntermediateThrowEvent_023keng_12c44b63> +0ms
  bpmn-engine:bpmn:startevent <StartEvent_1> enter  +2ms
  bpmn-engine:bpmn:startevent <StartEvent_1> format run.start message content +2ms
  bpmn-engine:bpmn:startevent <StartEvent_1> completed formatting run.start +0ms
  bpmn-engine:bpmn:startevent <StartEvent_1> start  +0ms
  bpmn-engine:bpmn:startevent <StartEvent_1_3784e097 (StartEvent_1)> execute +2ms
  bpmn-engine:bpmn:startevent <StartEvent_1_3784e097 (StartEvent_1)> completed execution +1ms
  bpmn-engine:bpmn:sequenceflow <SequenceFlow_1uguq0y_2e853a75 (SequenceFlow_1uguq0y)> take, target <Task_1eq3n1s> +39ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s> enter  +0ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s> format run.start message content +1ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s> format run.start message content +0ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s> completed formatting run.start +0ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s> start  +1ms
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s_1b21248b (Task_1eq3n1s)> execute +1ms
*task1*
  bpmn-engine:bpmn:scripttask <Task_1eq3n1s_1b21248b (Task_1eq3n1s)> completed execution +3ms
  bpmn-engine:bpmn:sequenceflow <SequenceFlow_1xz232n_39fa5ac5 (SequenceFlow_1xz232n)> take, target <IntermediateThrowEvent_0wbsqd7> +45ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7> enter  +0ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7> format run.start message content +0ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7> completed formatting run.start +0ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7> start  +0ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b (IntermediateThrowEvent_0wbsqd7)> execute +2ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b (IntermediateThrowEvent_0wbsqd7)> start event definition bpmn:SignalEventDefinition, index 0 +1ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b_0 (IntermediateThrowEvent_0wbsqd7)> execute event definition bpmn:SignalEventDefinition, index 0 +1ms
  bpmn-engine:bpmn:signaleventdefinition <IntermediateThrowEvent_0wbsqd7_3727726b_0 (IntermediateThrowEvent_0wbsqd7)> throw signal <Signal_0y9ojr4> named Signal_39f64n8 +0ms
  bpmn-engine:bpmn:signaleventdefinition <IntermediateThrowEvent_0wbsqd7_3727726b_0 (IntermediateThrowEvent_0wbsqd7)> throw signal <Signal_0y9ojr4> with name: Signal_39f64n8 +0ms
  bpmn-engine:bpmn:definitions <Definitions_18a4j13_3a9d8cc6 (Definitions_18a4j13)> signal <Signal_0y9ojr4> event received from <Process_0pkt3xj.IntermediateThrowEvent_0wbsqd7>. Delegating. +59ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b_0 (IntermediateThrowEvent_0wbsqd7)> event definition bpmn:SignalEventDefinition completed, index 0 +12ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b_0 (IntermediateThrowEvent_0wbsqd7)> completed sub execution +1ms
  bpmn-engine:bpmn:intermediatethrowevent <IntermediateThrowEvent_0wbsqd7_3727726b (IntermediateThrowEvent_0wbsqd7)> completed execution +0ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng> enter  +41ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng> format run.start message content +1ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng> completed formatting run.start +0ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng> start  +0ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng_12c44b63 (IntermediateThrowEvent_023keng)> execute +1ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng_12c44b63 (IntermediateThrowEvent_023keng)> start event definition bpmn:SignalEventDefinition, index 0 +2ms
  bpmn-engine:bpmn:startevent <IntermediateThrowEvent_023keng_12c44b63_0 (IntermediateThrowEvent_023keng)> execute event definition bpmn:SignalEventDefinition, index 0 +0ms
  bpmn-engine:bpmn:signaleventdefinition <IntermediateThrowEvent_023keng_12c44b63_0 (IntermediateThrowEvent_023keng)> waiting for signal <Signal_0y9ojr4> with name: Signal_39f64n8 +0ms
  bpmn-engine:bpmn:process <Process_0pkt3xj_1445b30c (Process_0pkt3xj)> left <StartEvent_1> (bpmn:StartEvent), pending runs 2 [ 'IntermediateThrowEvent_023keng', 'SequenceFlow_1uguq0y' ] +54ms
  bpmn-engine:bpmn:process <Process_0pkt3xj_1445b30c (Process_0pkt3xj)> left <Task_1eq3n1s> (bpmn:ScriptTask), pending runs 2 [ 'IntermediateThrowEvent_023keng', 'SequenceFlow_1xz232n' ] +3ms
  bpmn-engine:bpmn:process <Process_0pkt3xj_1445b30c (Process_0pkt3xj)> left <IntermediateThrowEvent_0wbsqd7> (bpmn:SignalEventDefinition), pending runs 1 [ 'IntermediateThrowEvent_023keng' ] +0ms

I will gladly submit a PR for LinkEvent when I'm able to get it all working. Thank you for your work and support on this project!

link.bpmn.txt

from bpmn-elements.

paed01 avatar paed01 commented on July 21, 2024

You are correct, it's a race condition. The first flow completes before the second flow is entered. I have to rethink the signal feature.

from bpmn-elements.

paed01 avatar paed01 commented on July 21, 2024

A bumped package is now published on npm.

from bpmn-elements.

jonklein avatar jonklein commented on July 21, 2024

Thank you - I'm able to verify this as fixed.

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.