Interface ObjectWorkflow
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<CommunicationMethodDef>
defines all the communication methods for this workflow, this includes 1.default PersistenceOptions
default List<PersistenceFieldDef>
defines all the persistence fields for this workflow, this includes: 1.defines the states of the workflow.default String
Define the workflowType of this workflow definition.
-
Method Details
-
getWorkflowStates
defines the states of the workflow. A state represents a step of the workflow state machine. A state can execute some commands (signal/timer) and wait for result See more details in theWorkflowState
definition. By default, this return an empty list, meaning no states. There can be at most one startingState in the list. If there is no startingState or with the default empty state list, the workflow will not start any state execution after workflow stated. However, application code can still use RPC to invoke new state execution in the future.- Returns:
- all the state definitions
-
getPersistenceSchema
defines all the persistence fields for this workflow, this includes: 1. Data attributes 2. Search attributesData attributes can be read/upsert in WorkflowState start/decide API Data attributes can also be read by RPC/GetDataAttributes API by external applications using
Client
Search attributes can be read/upsert in WorkflowState start/decide API Search attributes can also be read by RPC/GetSearchAttributes Client API by external applications External applications can also use "SearchWorkflow" API to find workflows by SQL-like query
- Returns:
- the persistence schema
-
getPersistenceOptions
-
getCommunicationSchema
defines all the communication methods for this workflow, this includes 1. Signal channel 2. Interstate channelSignal channel is for external applications to send signal to workflow execution. Workflow execution can listen on the signal in the WorkflowState start API and receive in the WorkflowState decide API
InternalChannel is for synchronization communications within the workflow execution internally. E.g. WorkflowStateA will continue after receiving a value from WorkflowStateB, or from an RPC
- Returns:
- the communication schema
-
getWorkflowType
Define the workflowType of this workflow definition. By default, it's the simple name of the workflow instance, which should be the case for most scenarios.Implement this to provide a different workflowType than default to avoid breaking changes when changing workflow class name. However,
Client
must then use String to provide workflow type to start workflows.- Returns:
- the workflow type
-