v2.0.0
What's Changed
We've done a lot of work over the last 8 months to the SpiffWorkflow library as we've developed SpiffArena, a general purpose workflow management system built on top of this library.
This has resulted in a handful of new features.
Our main focus was on making SpiffWorkflow more predictable, easier to use, and internally consistent.
Breaking Changes from 1.x:
- We heavily refactored the way we handle multi-instance tasks internally. This will break any serialized workflows that contain multi-instance tasks.
- Internal structure of our code, the names of some classes, and common methods have changed. Please see our [ReadTheDocs] (https://readthedocs.org/projects/spiffworkflow/) documenation for version 2.0.0.
Features and Improvements
Task States, Transitions, Hooks, and Execution
Previous to 2.0, SpiffWorklow was a little weird about its states, performing the actual execution in the on_complete() hook.
This was VERY confusing.
Tasks now have a _run() command separate from state change hooks.
The return value of the _run() command can be true (worked), false (failure), or None (not yet done).
This opens the door for better overall state management at the moment it is most critical (when the task is actually executing).
We also added new task state called "STARTED" that describes when a task was started, but hasn't finished yet, an oddly missing state in previous versions.
- Improvement/execution and serialization cleanup by @essweine in #289
- Bugfix/execute tasks on ready by @essweine in #303
- Feature/standardize task execution by @essweine in #307
- do not execute boundary events in catch by @essweine in #312
- Feature/new task states by @essweine in #315
Improved Events
We refactored the way we handle events, making them more powerful and adaptable.
Timer events are now parsed according to the ISO 8601 standard.
- Feature/multiple event definition by @essweine in #268
- hacks to handle timer events like regular events by @essweine in #273
- Feature/improved timer events by @essweine in #284
- reset boundary events in loops by @essweine in #294
- Bugfix/execute event gateways on ready by @essweine in #308
Improved Multi-Instance Tasks
We refactored how Multi-instance tasks are handled internally, vastly simplifying their representation during execution and serialization.
No more 'phantom gateways.'
Improved SubProcesses
SpiffWorkflow did not previously distinguish between a Call Activity and a SubProcess, but they handle Data Objects very differently.
A SubProcess is now able to access its parent data objects, a Call Activity can not.
We also wanted the ability to execute Call Activities independently of the parent process.
- Bugfix/subprocess access to data objects by @essweine in #296
- start workflow while subprocess is waiting by @essweine in #302
- use same data objects & references in subprocesses after deserialization by @essweine in #314
Improved Data Objects / Data Stores
This work will continue in subsequent releases, but we have added support for Data Stores, and it is possible to provide your own implementations.
Improved Inclusive Gateways
We added support for Inclusive Gateways.
Pre and Post Script Fixes
We previously supported adding a pre-script or post-script to any task but there were a few lingering bugs that needed fixing.
- parse spiff script extensions in service tasks by @essweine in #257
- pass script to workflow task exec exception by @essweine in #258
- update execution order for postscripts by @essweine in #259
DMN Improvements
We now support a new hit policy of "COLLECT" which allows you to match on an array of items. DMN support is still limited, but
we are making headway. We would love to know if people are using these features.
- Support for the "COLLECT" hit policy. by @danfunk in #267
- Bugfix/handle dash in DMN by @essweine in #323
BPMN Validation
We improved validation of BPMN and DMN Files to catch errors earlier.
New Serializer
There are some breaking changes in the new serializer, but it is much faster and more stable. We do attempt to upgrade
your serialized workflows to the new format, but you will definitely encounter issues if you were using multi-instance tasks.
Lightning Fast, Stable Tests
- Fix ResourceWarning: unclosed file BpmnParser.py:60 by @jbirddog in #270
- Option to run tests in parallel by @jbirddog in #271
Better Errors
- Feature/better errors by @danfunk in #283
- Workflow Data Exceptions were broken in the previous error refactor. … by @danfunk in #287
- added an exception for task not found w/ @burnettk by @jasquat in #310
- give us a better error if for some reason a task does not exist by @burnettk in #311
Flexible Data Management
Various Enhancements
Make it easier to reference SpiffWorkflow library classes from your own code.
- Feature/add init to schema by @jasquat in #260
- cleaning up code smell by @danfunk in #261
- Feature/cleanup task completion by @essweine in #263
- disambiguate DMN expressions by @essweine in #264
- Add in memory BPMN/DMN parser functions by @jbirddog in #320
Better Introspection
Added the ability to ask SpiffWorkflow some useful questions about a specification such as, "What call activities does this depend on?",
"What messages does this process send and receive", and "What lanes exist on this workflow specification?"
- Parser Information about messages, correlation keys, and the presence of lanes by @danfunk in #262
- Called elements by @jbirddog in #316
Code Cleanup
- Improvement/task spec attributes by @essweine in #328
- update license by @essweine in #324
- Feature/remove unused BPMN attributes and methods by @essweine in #280
- Improvement/remove camunda from base and misc cleanup by @essweine in #295
- remove minidom by @essweine in #300
- Feature/remove loop reset by @essweine in #305
- Feature/create core test package by @essweine in #306
- remove celery task and dependency by @essweine in #322
- remove one deprecated and unused feature by @essweine in #329
- change the order of tasks when calling get_tasks() by @danfunk in #319
Improved Documentation
- Fixes grammar, typos, and spellings by @rachfop in #291
- Updates for 2.0 release by @essweine in #330
- Bugfix/non BPMN tutorial by @essweine in #317
Bug Fixes
- correct xpath for extensions by @essweine in #265
- prevent output associations from being removed twice by @essweine in #275
- fix for workflowspec dump by @subhakarks in #282
- add checks for len == 0 when copying based on io spec by @essweine in #297
- Improvement/allow duplicate subprocess names by @essweine in #321
- Resets to tasks with Boundary Events by @danfunk in #326
- Sub-workflow tasks should be marked as "Future" when resetting to a task before the sub-process. by @danfunk in #327
New Contributors
- @subhakarks made their first contribution in #282
- @rachfop made their first contribution in #291
Full Changelog: v1.2.1...v2.0.0