|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.simpleworkflow.flow.generic.WorkflowDefinition
public abstract class WorkflowDefinition
Base class for all workflow definitions. Implementation should use
Execute
to specify workflow name different from implementation class
name, different workflow version and other workflow instance registration and
execution parameters.
Execute
Constructor Summary | |
---|---|
WorkflowDefinition()
|
Method Summary | |
---|---|
abstract Promise<String> |
execute(String input)
Asynchronous method that implements workflow business logic. |
abstract String |
getWorkflowState()
Return state that is inserted decision completion through RespondDecisionTaskCompletedRequest.setExecutionContext(String)
and later can be retrieved through
AmazonSimpleWorkflow.describeWorkflowExecution(com.amazonaws.services.simpleworkflow.model.DescribeWorkflowExecutionRequest)
visibility call. |
abstract void |
signalRecieved(String signalName,
String input)
Asynchronous method that implements signals handling logic. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkflowDefinition()
Method Detail |
---|
public abstract Promise<String> execute(String input) throws WorkflowException
TryCatchFinally
. Workflow is
completed when TryCatchFinally.doFinally()
is executed. So even
if return Promise
of the method is ready but there is some
asynchronous task or activity still not completed workflow is not going
to complete.
input
- Data passed to the worklfow instance during start instance
call.
WorkflowException
- Prefer throwing WorkflowException
.public abstract void signalRecieved(String signalName, String input) throws WorkflowException
TryCatchFinally
that is used to execute workflow. It means that non handled failure
inside this method causes workflow execution failure.
Exception
- Prefer throwing WorkflowException
.
Exception
WorkflowException
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
Task
or calling methods marked with Asynchronous
annotation. It is also expected to be read only operation which is not
allowed to modify state of workflow in any way.
WorkflowException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |