public abstract class WorkflowDefinition extends Object
Executeto specify workflow name different from implementation class name, different workflow version and other workflow instance registration and execution parameters.
|Constructor and Description|
|Modifier and Type||Method and Description|
Asynchronous method that implements workflow business logic.
Return state that is inserted decision completion through
Asynchronous method that implements signals handling logic.
public abstract Promise<String> execute(String input) throws WorkflowException
TryCatchFinally. Workflow is completed when
TryCatchFinally.doFinally()is executed. So even if return
Promiseof the method is ready but there is some asynchronous task or activity still not completed workflow is not going to complete.
public abstract void signalRecieved(String signalName, String input) throws WorkflowException
TryCatchFinallythat is used to execute workflow. It means that non handled failure inside this method causes workflow execution failure.
public abstract String getWorkflowState() throws WorkflowException
RespondDecisionTaskCompletedRequest.setExecutionContext(String)and later can be retrieved through
AmazonSimpleWorkflow.describeWorkflowExecution(com.amazonaws.services.simpleworkflow.model.DescribeWorkflowExecutionRequest)visibility call. Implementation of this call is expected to be synchronous and is not allowed to invoke any asynchronous operations like creation of new
Taskor calling methods marked with
Asynchronousannotation. It is also expected to be read only operation which is not allowed to modify state of workflow in any way.