Package de.danet.an.workflow.api

Examples of de.danet.an.workflow.api.Process


        if (baseUrl == null || activity == null) {
            throw new IllegalArgumentException();
        }
        this.baseUrl = baseUrl;
        this.resource = AbstractResponseGenerator.RESOURCE_ACTIVITY;
        Process process = (Process)activity.container();
        ProcessDefinition procDef = process.processDefinition();
        this.packageId = procDef.packageId();
        this.processId = procDef.processId();
        this.processKey = process.key();
        this.activityKey = activity.key();
    }
View Full Code Here


  Collection res = new ArrayList ();
  try {
      Collection hashEqual
    = processHome().findByRequesterHash (req.hashCode());
      for (Iterator i = hashEqual.iterator (); i.hasNext();) {
    Process p = (Process)i.next ();
    if (p.requester().equals (req)) {
        res.add (p);
    }
      }
      return res;
  } catch (ResourceNotAvailableException re) {
View Full Code Here

    protected Process createProcess (String pkgId, String prcId)
        throws Exception {
  ProcessDefinitionDirectory pdd
      = workflowService().processDefinitionDirectory();
  ProcessMgr pmgr = pdd.processMgr(pkgId, prcId);
  Process process = (Process) pmgr.createProcess (defaultRequester());
  return process;
    }
View Full Code Here

    /**
     * Create the process of id="P0".
     * @exception Exception if an error occurs
     */
    public void createProcess() throws Exception {
  Process process = createProcess(packageID, "P0");
    }
View Full Code Here

    /**
     * Create and start the process of id="P0".
     * @exception Exception if an error occurs
     */
    public void createAndStartProcess() throws Exception {
  Process process = createProcess(packageID, "P0");
  process.start();
    }
View Full Code Here

    /**
     * Create and start the process of id="P0".
     * @exception Exception if an error occurs
     */
    public void createStartAndInitializeProcess() throws Exception {
  Process process = createProcess(packageID, "P0");
  process.setProcessContext(initialProcessData);
  process.start();
    }
View Full Code Here

  // loop for all processes created
  ProcessDirectory pd = workflowService().processDirectory();
  Collection processes = pd.processes();
  for (Iterator it=processes.iterator(); it.hasNext();) {
      try {
    Process process = (Process)(it.next());
    pd.removeProcess(process);
      } catch (Exception e) {
    // process not in database anymore, so it is not running anymore
      }
  }
View Full Code Here

    public static void closeAllCloseableProcesses() throws Exception {
  // loop for all processes created
  ProcessDirectory pd = workflowService().processDirectory();
  Collection processes = pd.processes();
  for (Iterator it=processes.iterator(); it.hasNext();) {
      Process process = (Process)(it.next());
      try {
    process.abort();
      } catch (Exception e) {
    try {
        process.terminate();
    } catch (Exception ex) {
    }
      }
  }
    }
View Full Code Here

  do {
      runningProcesses = false;
      Collection processes = pd.processes();
      for (Iterator it=processes.iterator();it.hasNext();) {
    try {
        Process process = (Process)(it.next());
        if (process.state().startsWith("open.running")) {
      runningProcesses = true;
        }   
    } catch (NoSuchObjectException e) {
        // object not database anymore, so it is not running anymore
    }
View Full Code Here

    protected Process createProcess (String pkgId, String prcId)
        throws Exception {
  ProcessDefinitionDirectory pdd
      = workflowService().processDefinitionDirectory();
  ProcessMgr pmgr = pdd.processMgr(pkgId, prcId);
  Process process = (Process) pmgr.createProcess (defaultRequester());
  return process;
    }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.api.Process

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.