Workflow Management
Workflow Management Endpoint
A custom workflows
management endpoint using Spring Actuator is provided to manage workflows.
To enable the workflows management endpoint:
management: endpoints: web: exposure: include: "workflows"
Once the workflows
management endpoint is enabled, the following operations can be performed:
Endpoint | Operation | Payloads |
---|---|---|
|
Read |
Request: None. Response: Same payload as the |
|
Read |
Request: None. Response: { "id": "<workflowId>", "enabled": (true|false), "state": "(running|stopped|paused|unknown)", "inputBindings": [ "<input-binding>" ], "outputBindings": [ "<output-binding>" ] } |
|
Write |
Request: { "state": "STARTED|STOPPED|PAUSED|RESUMED" } Response: None. |
-
Only workflows with Solace PubSub+ consumers (where the
solace
binder is defined in theinput-#
) support pause/resume. -
Some features require for the connector to manage workflow lifecycles. There’s no guarantee that workflow states continue to persist when write operations are used to change the workflow states while such features are in use.
For example, when the connector is configured in the
active-standby
mode, workflows will automatically transition fromrunning
tostopped
when the connector fails over fromactive
tostandby
, and vice-versa for a failover in the opposite direction.
Workflow States
A workflow’s state is defined as the aggregate states of its bindings (see the bindings
management endpoint) as follows:
Workflow State | Condition |
---|---|
|
All bindings have |
|
All bindings have |
|
All consumer bindings and all pausable producer bindings have |
|
None of the other states. Represents an inconsistent aggregate binding state. |
When the producer or consumer binding is not implementing Spring’s Lifecycle interface, Spring always reports the bindings as state=N/A
. The state=N/A
is ignored when deciding the overall state of the workflow. For example, if the consumer's binding is state=running
and the producer's binding is state=N/A
(or vice versa), the workflow state would be running
.
For more information about binding states, see Spring Cloud Stream: Binding visualization and control.