Comments (6)
The TRIGGERED state has been replaced by an attribute. ee8a620
from spiffworkflow.
A lot of the confusion in TaskSpec comes from the fact that the purpose of the some methods is not defined clearly enough. I did some preliminary work to organize this better and the plan is to implement the following:
- _update_state() and _update_state_hook(): Should be merged with _predict()/_predict_hook(). Call the resulting methods _update() and _update_hook().
_update() recursively updates the derivation tree as well as it can given the currently available information. That means it will add or remove children from the derivation tree, AND update the status of all children. - _try_fire() methods: Renamed to _start(), those should do the work, update the status of the directly associated task spec, and initiate a call to _update() when there is reason to believe that the derivation tree may be affected. This method does NOT change the status of any other task, nor does it change the structure of the derivation tree. An exception is when the purpose of the task is to trigger or cancel a target, in which case this method may change the status of the target before calling update().
- _trigger() methods: Just like _start(), except they may also change the status of the triggered task.
- _on_complete() methods: Renamed to _confirm(). They do not change the derivation tree, and do not change the tree's status.
- _on_ready() methods: TBD. They may not change the status of the triggered task.
- _on_cancel(): TBD
from spiffworkflow.
Some TaskSpec objects have a state even though they should not. E.g. Trigger.queued needs a place to store Workflow global data.
from spiffworkflow.
In which state should a task that has experienced an error condition be? There's no error
status.
from spiffworkflow.
In general, the control of a workflow allows for three options after a task has started:
- Allow for trying the task again, or
- allow to continue as if the task was successful, or
- do not allow to continue with the branch.
The existing states already allow for modeling this behavior, and the task implementation can decide whichever status makes the most sense after an error:
- If the task is to be tried again, go to FUTURE or WAITING,
- if the task may continue, go to COMPLETED,
- else go to CANCELLED.
It is possible that adding a specific ERROR state makes some things simpler, but I am not sure how that should affect the flow; either of the above options should still be available. Do you have a specific use case where this would have helped?
from spiffworkflow.
Another refactoring: Some of the BPMN-layer specific code that just landed in master should move into the core object model:
Adding support for Sequence objects may be useful to the core model; the extra place for storing data and docs make sense when creating a UI editor. This may actually allow for merging the BPMN "emulation layer" with the core model: All BPMNSpecs could be converted into standard TaskSpec objects, and used interchangably with SpiffWorkflow's existing model. Similarly, the storage objects could use the standard serializer API.
from spiffworkflow.
Related Issues (20)
- Fix error message for missing start event HOT 2
- BpmnParser.find_all_specs() breaks with nested subprocess HOT 1
- SpiffWorkflow.bpmn.parser.ValidationException.ValidationException: No DMN Diagram available with id "None", Available DMN ids are: product_prices. HOT 1
- Support conditional events
- remove Box from the script engine enviroments
- Spiffworkflow Library - State Transitions HOT 3
- Update documentation HOT 1
- Cycle timer child task doesn't inherit parent task data HOT 2
- 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
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.