Closed knipknap closed 3 years ago
The TRIGGERED state has been replaced by an attribute. ee8a620
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:
Some TaskSpec objects have a state even though they should not. E.g. Trigger.queued needs a place to store Workflow global data.
In which state should a task that has experienced an error condition be? There's no error
status.
In general, the control of a workflow allows for three options after a task has started:
The existing states already allow for modeling this behavior, and the task implementation can decide whichever status makes the most sense after an error:
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?
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.
Some refactoring of the TaskSpec classes seems to be in order: