com.amazonaws.services.simpleworkflow.flow.generic

## クラス WorkflowDefinition

- java.lang.Object
- - com.amazonaws.services.simpleworkflow.flow.generic.WorkflowDefinition

- 直系の既知のサブクラス:
    POJOWorkflowDefinition

      public abstract class WorkflowDefinition
      extends java.lang.Object

  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.
  作成者:
    fateev
  関連項目:
    `Execute`

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `WorkflowDefinition()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `abstract Promise<java.lang.String>` | `execute(java.lang.String input)` Asynchronous method that implements workflow business logic.
    `abstract java.lang.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(java.lang.String signalName, java.lang.String input)` Asynchronous method that implements signals handling logic.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### WorkflowDefinition

          public WorkflowDefinition()

  - ### メソッドの詳細

    - #### execute

          public abstract Promise<java.lang.String> execute(java.lang.String input)
                                                     throws WorkflowException

      Asynchronous method that implements workflow business logic. This method invocation is surrounded by `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`.

    - #### signalRecieved

          public abstract void signalRecieved(java.lang.String signalName,
                            java.lang.String input)
                                       throws WorkflowException

      Asynchronous method that implements signals handling logic. This method invocation is surrounded by the same doTry of `TryCatchFinally` that is used to execute workflow. It means that non handled failure inside this method causes workflow execution failure.
      例外:
        `java.lang.Exception` - Prefer throwing `WorkflowException`.
        `java.lang.Exception`
        `WorkflowException`

    - #### getWorkflowState

          public abstract java.lang.String getWorkflowState()
                                                     throws WorkflowException

      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. 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.
      戻り値:
        current state of the workflow execution.
      例外:
        `WorkflowException`