Examples of WorkflowExecution


Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

        }
    }

    void handleChildWorkflowExecutionCompleted(HistoryEvent event) {
        ChildWorkflowExecutionCompletedEventAttributes attributes = event.getChildWorkflowExecutionCompletedEventAttributes();
        WorkflowExecution execution = attributes.getWorkflowExecution();
        String workflowId = execution.getWorkflowId();
        if (decisions.handleChildWorkflowExecutionClosed(workflowId)) {
            OpenRequestInfo<StartChildWorkflowReply, WorkflowType> scheduled = scheduledExternalWorkflows.remove(workflowId);
            if (scheduled != null) {
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                String result = attributes.getResult();
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

        SignalExternalWorkflowExecutionFailedEventAttributes attributes = event.getSignalExternalWorkflowExecutionFailedEventAttributes();
        String signalId = attributes.getControl();
        if (decisions.handleSignalExternalWorkflowExecutionFailed(signalId)) {
            OpenRequestInfo<Void, Void> signalContextAndResult = scheduledSignals.remove(signalId);
            if (signalContextAndResult != null) {
                WorkflowExecution signaledExecution = new WorkflowExecution();
                signaledExecution.setWorkflowId(attributes.getWorkflowId());
                signaledExecution.setRunId(attributes.getRunId());
                Throwable failure = new SignalExternalWorkflowException(event.getEventId(), signaledExecution,
                        attributes.getCause());
                signalContextAndResult.getCompletionHandle().fail(failure);
            }
        }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

        }
        return true;
    }

    private Exception wrapFailure(final ActivityTask task, Throwable failure) {
        WorkflowExecution execution = task.getWorkflowExecution();

        RuntimeException e2 = new RuntimeException(
                "Failure taskId=\"" + task.getStartedEventId() + "\" workflowExecutionRunId=\"" + execution.getRunId()
                        + "\" workflowExecutionId=\"" + execution.getWorkflowId() + "\"", failure);
        return e2;
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

     *      WorkflowExecution, long)
     */
    public static String waitForWorkflowInstanceCompletionAcrossGenerations(AmazonSimpleWorkflow service, String domain,
            WorkflowExecution workflowExecution, long timeoutSeconds) throws InterruptedException, TimeoutException {

        WorkflowExecution lastExecutionToRun = workflowExecution;
        long millisecondsAtFirstWait = System.currentTimeMillis();
        String lastExecutionToRunCloseStatus = waitForWorkflowInstanceCompletion(service, domain, lastExecutionToRun,
                timeoutSeconds);

        // keep waiting if the instance continued as new
        while (lastExecutionToRunCloseStatus.equals(CloseStatus.CONTINUED_AS_NEW.toString())) {
            // get the new execution's information
            HistoryEvent closeEvent = getInstanceCloseEvent(service, domain, lastExecutionToRun);
            WorkflowExecutionContinuedAsNewEventAttributes continuedAsNewAttributes = closeEvent.getWorkflowExecutionContinuedAsNewEventAttributes();

            WorkflowExecution newGenerationExecution = new WorkflowExecution().withWorkflowId(lastExecutionToRun.getWorkflowId()).withRunId(
                    continuedAsNewAttributes.getNewExecutionRunId());
           
            // and wait for it
            long currentTime = System.currentTimeMillis();
            long millisecondsSinceFirstWait = currentTime - millisecondsAtFirstWait;
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

    @Override
    public T getClient() {
        checkGenericClient();
        String workflowId = genericClient.generateUniqueId();
        WorkflowExecution workflowExecution = new WorkflowExecution().withWorkflowId(workflowId);
        return getClient(workflowExecution, startWorkflowOptions, dataConverter, genericClient);
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowExecution

    @Override
    public T getClient(String workflowId) {
        if (workflowId == null || workflowId.isEmpty()) {
            throw new IllegalArgumentException("workflowId");
        }
        WorkflowExecution workflowExecution = new WorkflowExecution().withWorkflowId(workflowId);
        return getClient(workflowExecution, startWorkflowOptions, dataConverter, genericClient);
    }
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.api.WorkflowExecution

     * @throws  ItemNotFoundException
     * @throws  RepositoryException
     */
  public WorkflowExecution retrieveWorkflowExecution(String id) throws ItemNotFoundException, RepositoryException {
      log.fine("JCRManager.retrieveWorkflowExecution()");
      WorkflowExecution _retVal = null;
      try {
        this.getSession();
        Node _defNode = session.getNodeByUUID(id);
          Property _propId = _defNode.getProperty("id");
          Property _propUser = _defNode.getProperty("userName");
          Property _propWorkflowId = _defNode.getProperty("workflowId");
          _retVal = new WorkflowExecution(_propId.getString(), _propUser.getString());
          _retVal.setWorkflowId(_propWorkflowId.getString());
      } finally {
        log.fine("logging out session");
        session.logout();
      }
     
View Full Code Here

Examples of org.apache.airavata.registry.api.WorkflowExecution

        return property;
  }

  public WorkflowExecution getWorkflowExecution(String experimentId)
      throws RegistryException {
    WorkflowExecution workflowExecution = new WorkflowExecutionImpl();
    workflowExecution.setExperimentId(experimentId);
    workflowExecution.setExecutionStatus(getWorkflowExecutionStatus(experimentId));
    workflowExecution.setUser(getWorkflowExecutionUser(experimentId));
    workflowExecution.setMetadata(getWorkflowExecutionMetadata(experimentId));
    workflowExecution.setOutput(getWorkflowExecutionOutput(experimentId));
    workflowExecution.setServiceInput(searchWorkflowExecutionServiceInput(experimentId,".*",".*"));
    workflowExecution.setServiceOutput(searchWorkflowExecutionServiceOutput(experimentId,".*",".*"));
    return workflowExecution;
  }
View Full Code Here

Examples of org.apache.airavata.registry.api.workflow.WorkflowExecution

        keywords[i] = ((InputNode) node).getName();
        values[i] = ((InputNode) node).getDefaultValue();
                //Saving workflow input Node data before running the workflow
                WorkflowNodeType workflowNodeType = new WorkflowNodeType();
                workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.INPUTNODE);
                WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution(getConfig().getTopic(),
                        getConfig().getTopic()), node.getID());
                this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceNodeInput(workflowInstanceNode, keywords[i] + "=" + (String) values[i]);
                this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode, workflowNodeType);
      }
      this.config.getNotifier().workflowStarted(values, keywords);
View Full Code Here

Examples of org.apache.airavata.registry.api.workflow.WorkflowExecution

            ((OutputNode) node).setDescription(val.toString());
          }
                    // Saving output Node data in to database
                    WorkflowNodeType workflowNodeType = new WorkflowNodeType();
                    workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
                    WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(new WorkflowExecution(config.getTopic(), config.getTopic()), node.getID());
                    String portname = node.getName();
                    String portValue = ((OutputNode) node).getDescription();
                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceNodeOutput(workflowInstanceNode, portname + "=" + portValue);
                    this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode, workflowNodeType);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.