Interface ObjectWorkflow


  • public interface ObjectWorkflow
    This is the interface to define an object workflow definition. ObjectWorkflow is a top level concept in iWF. Any object that is long-lasting(at least a few seconds) can be modeled as an "ObjectWorkflow".
    • Method Detail

      • getWorkflowStates

        java.util.List<StateDef> 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 the WorkflowState definition.
        Returns:
        all the state definitions
      • getPersistenceSchema

        default java.util.List<PersistenceFieldDef> getPersistenceSchema()
        defines all the persistence fields for this workflow, this includes: 1. Data attributes 2. Search attributes

        Data attributes can be read/upsert in WorkflowState start/decide API Data attributes can also be read by getDataObjects API by external applications using Client

        Search attributes can be read/upsert in WorkflowState start/decide API Search attributes can also be read by GetSearchAttributes Client API by external applications External applications can also use "SearchWorkflow" API to find workflows by SQL-like query

        Returns:
        the persistence schema
      • getCommunicationSchema

        default java.util.List<CommunicationMethodDef> getCommunicationSchema()
        defines all the communication methods for this workflow, this includes 1. Signal channel 2. Interstate channel

        Signal 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

        InterStateChannel is for synchronization communications between WorkflowStates. E.g. WorkflowStateA will continue after receiving a value from WorkflowStateB

        Returns:
        the communication schema
      • getWorkflowType

        default java.lang.String getWorkflowType()
        Define the workflowType of this workflow definition. By default(when return empty string), it's the simple name of the workflow instance, which should be the case for most scenarios.

        In case of dynamic workflow implementation, return customized values based on constructor input.

        Returns:
        the workflow type