spiff-arena/SpiffWorkflow/RELEASE_NOTES.md

10 KiB

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 just 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 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.

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.

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.

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.

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.

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

Better Errors

Flexible Data Management

Various Enhancements

Make it easier to reference SpiffWorkflow library classes from your own code.

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?"

Code Cleanup

Improved Documentation

Bug Fixes

New Contributors

Full Changelog: https://github.com/sartography/SpiffWorkflow/compare/v1.2.1...v2.0.0