Example usage for com.amazonaws.services.simpleworkflow.model WorkflowExecutionInfo getCloseStatus

List of usage examples for com.amazonaws.services.simpleworkflow.model WorkflowExecutionInfo getCloseStatus

Introduction

In this page you can find the example usage for com.amazonaws.services.simpleworkflow.model WorkflowExecutionInfo getCloseStatus.

Prototype


public String getCloseStatus() 

Source Link

Document

If the execution status is closed then this specifies how the execution was closed:

  • COMPLETED – the execution was successfully completed.

    Usage

    From source file:org.apache.camel.component.aws.swf.CamelSWFWorkflowClient.java

    License:Apache License

    public Map<String, Object> describeWorkflowInstance(String workflowId, String runId) {
        DescribeWorkflowExecutionRequest describeRequest = new DescribeWorkflowExecutionRequest();
        describeRequest.setDomain(configuration.getDomainName());
        describeRequest.setExecution(new WorkflowExecution().withWorkflowId(workflowId).withRunId(runId));
        WorkflowExecutionDetail executionDetail = endpoint.getSWClient().describeWorkflowExecution(describeRequest);
        WorkflowExecutionInfo instanceMetadata = executionDetail.getExecutionInfo();
    
        Map<String, Object> info = new HashMap<String, Object>();
        info.put("closeStatus", instanceMetadata.getCloseStatus());
        info.put("closeTimestamp", instanceMetadata.getCloseTimestamp());
        info.put("executionStatus", instanceMetadata.getExecutionStatus());
        info.put("tagList", instanceMetadata.getTagList());
        info.put("executionDetail", executionDetail);
        return info;/*from   ww  w . j  av  a  2 s  .c  o m*/
    }