Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2012, Inc. or its affiliates. All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License").
  * You may not use this file except in compliance with the License.
  * A copy of the License is located at
 * or in the "license" file accompanying this file. This file is distributed
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
Base class for all workflow definitions. Implementation should use to specify workflow name different from implementation class name, different workflow version and other workflow instance registration and execution parameters.

public abstract class WorkflowDefinition {

Asynchronous method that implements workflow business logic. This method invocation is surrounded by Workflow is completed when is executed. So even if return 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.
Throws: Prefer throwing
    public abstract Promise<Stringexecute(String inputthrows WorkflowException;

Asynchronous method that implements signals handling logic. This method invocation is surrounded by the same doTry of that is used to execute workflow. It means that non handled failure inside this method causes workflow execution failure.

    public abstract void signalRecieved(String signalNameString inputthrows WorkflowException;

Return state that is inserted decision completion through and later can be retrieved through visibility call. Implementation of this call is expected to be synchronous and is not allowed to invoke any asynchronous operations like creation of new or calling methods marked with 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.
    public abstract String getWorkflowState() throws WorkflowException;
New to GrepCode? Check out our FAQ X