ke4roh / vertx-engine

An execution engine for processing things, based on vertx
Apache License 2.0
1 stars 2 forks source link

Allow a strictly sequential Section #54

Closed ke4roh closed 5 years ago

ke4roh commented 5 years ago

A section author may wish the steps to execute in a strict sequence. This should be possible by making a notation on the section's settings like

name: MySection
class: ...Section
sequential: true
steps: [
...
]
ke4roh commented 5 years ago

This should be as simple as using a concat instead of mergeDelayError in the section execution code. Best to associate the boolean config with construction of one or another type which is then used to delegate the call to the correct combo.

The StepExecutor should recognize when its document changed event stream is completed, in which case all exceptions become step failures. In this way, the Section's execution order object can have a second method to generate either the document change stream or a completed stream depending on context. That won't work because the step isn't complete until the change has been published, and it watches the same stream to see that change. This may be better done after Issue #53 which could simplify change management.