Package org.apache.oodt.cas.workflow.structs

Examples of org.apache.oodt.cas.workflow.structs.Workflow


            return repo.getWorkflowById(workflowId);
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.WARNING, "Error getting workflow by its id: ["
                    + workflowId + "]: Message: " + e.getMessage());
            return new Workflow();
        }
    }
View Full Code Here


   
    private static final int defaultPgSz = 20;

    public TestLuceneWorkflowInstanceRepository() {
        testInst = new WorkflowInstance();
        testWkflw = new Workflow();
        testTask = new WorkflowTask();
        testCond = new WorkflowCondition();

        // check to see if catalog path exists: (it may b/c
        // the user may run many unit tests)
View Full Code Here

                .toString());
        workflowRepository = new XMLWorkflowRepository(workflowDirUris);
    }

    public void testGetWorkflowByName() {
        Workflow w = null;

        try {
            w = workflowRepository.getWorkflowByName("backwardsTestWorkflow");
        } catch (RepositoryException e) {
            e.printStackTrace();
View Full Code Here

        validateBackwardsWorkflow(w);
    }

    public void testGetWorkflowById() {
        Workflow w = null;

        try {
            w = workflowRepository
                    .getWorkflowById("urn:oodt:backwardsTestWorkflow");
        } catch (RepositoryException e) {
View Full Code Here

            throws RepositoryException {
        Connection conn = null;
        Statement statement = null;
        ResultSet rs = null;

        Workflow workflow = null;

        try {
            conn = dataSource.getConnection();
            statement = conn.createStatement();

            String getWorkflowSql = "SELECT * from workflows WHERE workflow_name = '"
                    + workflowName + "'";

            LOG.log(Level.FINE, "getWorkflowByName: Executing: "
                    + getWorkflowSql);
            rs = statement.executeQuery(getWorkflowSql);

            while (rs.next()) {
                workflow = DbStructFactory.getWorkflow(rs);

                if (getTasks) {
                    workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            throws RepositoryException {
        Connection conn = null;
        Statement statement = null;
        ResultSet rs = null;

        Workflow workflow = null;

        try {
            conn = dataSource.getConnection();
            statement = conn.createStatement();

            String getWorkflowSql = "SELECT * from workflows WHERE workflow_id = '"
                    + workflowId + "'";

            LOG
                    .log(Level.FINE, "getWorkflowById: Executing: "
                            + getWorkflowSql);
            rs = statement.executeQuery(getWorkflowSql);

            while (rs.next()) {
                workflow = DbStructFactory.getWorkflow(rs);

                if (getTasks) {
                    workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            LOG.log(Level.FINE, "getWorkflows: Executing: " + getWorkflowSql);
            rs = statement.executeQuery(getWorkflowSql);
            workflows = new Vector();

            while (rs.next()) {
                Workflow workflow = DbStructFactory.getWorkflow(rs);

                if (getTasks) {
                    workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
                }

                workflows.add(workflow);
            }
View Full Code Here

                    + getWorkflowSql);
            rs = statement.executeQuery(getWorkflowSql);
            workflows = new Vector();

            while (rs.next()) {
                Workflow workflow = DbStructFactory.getWorkflow(rs);

                if (getTasks) {
                    workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
                }
                workflows.add(workflow);
            }

            if (workflows.size() == 0) {
View Full Code Here

     * @param w
     *            The Hashtable to obtain a Workflow from.
     * @return a {@link Workflow} from the XML-RPC {@link Hashtable} version.
     */
    public static Workflow getWorkflowFromXmlRpc(Hashtable w) {
        Workflow workflow = new Workflow();
        workflow.setName((String) w.get("name"));
        workflow.setId((String) w.get("id"));
        workflow.setTasks(getWorkflowTasksFromXmlRpc((Vector) w.get("tasks")));

        return workflow;
    }
View Full Code Here

   * @return A new {@link Workflow} implementation specified by its class
   *         name.
   */
  public static Workflow getWorkflowObjectFromClassName(String className){
    if (className != null) {
      Workflow workflow = null;

      try {
        Class workflowClass = Class.forName(className);
        workflow = (Workflow) workflowClass
            .newInstance();
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.workflow.structs.Workflow

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.