Comments (2)
This is replicable with the the following even simpler diagram:
Instantiated tasks (as opposed to task specs) are always part of a tree (even in the spec contains a loop). When branches of a gateway are merged, spiff looks for any tasks associated with that spec and waits to proceed until all the branches that contain the gateway reach the task.
This causes a problem here, because the the parallel gateway has two direct ancestors: the 'Set x" task and the exclusive gateway, and the latter can't be reached until the gateway is executed once.
I am not sure what the best way to deal with this case is, and resolving the issue will likely take some thought (I can think of a couple of potential solutions, but they'd require some testing to make sure they don't break other cases).
The working case is a decent workaround, but it is reasonable to expect that the diagrams that don't work would work, though this might not turn out to be a very easy problem to fix. We should either figure out how to make it work (the ideal resolution) without breaking anything else, or raise an exception to warn that it won't, as you note.
from spiffworkflow.
The problem above raised a long and intense discussion yesterday in our own team on the very same
topics which started from the assumption that it seems intuitively that the broken case should work.
After doing more researh on documentation material the BPMN norm 2.0.2 indicates in sec. 10.6.4 at page 293:
A Parallel Gateway creates parallel paths without checking any conditions; each outgoing Sequence Flow receives a
token upon execution of this Gateway. For incoming flows, the Parallel Gateway will wait for all incoming flows
before triggering the flow through its outgoing Sequence Flows
A cross check on Camunda 7 documentation / parallel gateway tells:
An important difference with other gateway types is that the parallel gateway does not evaluate conditions. If conditions are defined on the sequence flow connected with the parallel gateway, they are simply ignored.
The BPMN standard is seemingly ambiguous about the fact that the gateway triggers after waiting incoming flows while at the same time indicating that incoming conditions are ignored.
The Camunda 7 documentation provides the same information but insist more on the fact that incoming conditions are simply ignored.
After cooking all that together it looks like a possible implementation in SpiffWorkflow would consist in checking whether an incoming flow has a condition set on it or not. If this is the case it could just be simply ignored for a <+>
gateway in state WAITING
?
This design looks in fact more consistent as it would behave the same as the working case above that triggers the activity even when an incoming condition is not fulfilled...
from spiffworkflow.
Related Issues (20)
- Workflow with endless cycle timer boundary event never completes HOT 2
- first cycle of cycle timer executes immediately HOT 2
- Error "IllegalMonthError: bad month number 13; must be 1-12" on Boundary Cycle Timer 1 month
- Figure out how to keep the example repo in sync wth this one
- Workflow Prematurely Ends After Timer Start Event in SpiffWorkflow v3.0.0rc2 HOT 2
- Type in the releast notes. HOT 1
- Multiple Inputs to a Task HOT 1
- Workflow gets bogged down when a task has too many children HOT 2
- update parser to handle correlations on recieve tasks
- Allow Schema / Validator on Workflow Data (inputs/outputs/stores) in Spiffworkflow lib
- Question: How to send BPMN signals from python and catch them in the BPMN diagram? HOT 6
- Rewrite parser
- Evaluate performance improvements to MI tasks
- Bounty Test Issue - SpiffWorkFlow - Open - Claim
- Multi-Instance Task: Parallel Execution Issue with Data Store Inputs HOT 1
- Process Instance Migration: Compare two process models to find differences HOT 1
- Process Instance Migration: Find all completed tasks in a Process Instance HOT 2
- Process Instance Migration: Update the process instance with a new model HOT 2
- Refactor event based gateways
- Madhu Test Bounty Issue 1 in SpiffWorkflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spiffworkflow.