Package org.apache.ivory.workflow.engine

Examples of org.apache.ivory.workflow.engine.AbstractWorkflowEngine


      String nominalTime = mapMessage.getString(ARG.nominalTime
          .getArgName());
      String status = mapMessage.getString(ARG.status.getArgName());
      String operation = mapMessage.getString(ARG.operation.getArgName());

      AbstractWorkflowEngine wfEngine = WorkflowEngineFactory.getWorkflowEngine();
      InstancesResult result = wfEngine
          .getJobDetails(cluster, workflowId);
            Date startTime = result.getInstances()[0].startTime;
            Date endTime = result.getInstances()[0].endTime;
            Long duration = (endTime.getTime() - startTime.getTime()) * 1000000;
      if (status.equalsIgnoreCase("FAILED")) {
View Full Code Here


    public InstancesResult getRunningInstances(String type, String entity, String colo) {
        checkColo(colo);
        checkType(type);
        try {
            validateNotEmpty("entityName", entity);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            Entity entityObject = EntityUtil.getEntity(type, entity);
            return wfEngine.getRunningInstances(entityObject);
        } catch (Throwable e) {
            LOG.error("Failed to get running instances", e);
            throw IvoryWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
    }
View Full Code Here

      Date start = EntityUtil.parseDateUTC(startStr);
      Date end = getEndDate(start, endStr);
      Entity entityObject = EntityUtil.getEntity(type, entity);

      AbstractWorkflowEngine wfEngine = getWorkflowEngine();
      return wfEngine.getStatus(
          entityObject, start, end);
    } catch (Throwable e) {
      LOG.error("Failed to get instances status", e);
      throw IvoryWebException
          .newInstanceException(e, Response.Status.BAD_REQUEST);
View Full Code Here

            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.killInstances(entityObject, start, end, props);
        } catch (Throwable e) {
            LOG.error("Failed to kill instances", e);
            throw IvoryWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
    }
View Full Code Here

            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.suspendInstances(entityObject, start, end, props);
        } catch (Throwable e) {
            LOG.error("Failed to suspend instances", e);
            throw IvoryWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
    }
View Full Code Here

            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.resumeInstances(entityObject, start, end, props);
        } catch (Throwable e) {
            LOG.error("Failed to resume instances", e);
            throw IvoryWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
    }
View Full Code Here

            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);

            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.reRunInstances(entityObject, start, end, props);
        } catch (Exception e) {
            LOG.error("Failed to rerun instances", e);
            throw IvoryWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ivory.workflow.engine.AbstractWorkflowEngine

Copyright © 2018 www.massapicom. 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.