Package de.danet.an.workflow.omgcore

Examples of de.danet.an.workflow.omgcore.WfProcess


    public void createProcess11Acts () throws Exception {
  WfProcess p = mgr1To10par.createProcess(defReq);
    }

    public void createProcess21Acts () throws Exception {
  WfProcess p = mgr1To20par.createProcess(defReq);
    }
View Full Code Here


    public void createProcess21Acts () throws Exception {
  WfProcess p = mgr1To20par.createProcess(defReq);
    }

    public void createStart11Acts () throws Exception {
  WfProcess p = mgr1To10par.createProcess(defReq);
  p.start ();
    }
View Full Code Here

  ProcessDirectory procDir = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr ("jstests", "testAbandon");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      for (Iterator i = process.activitiesInState("closed").iterator ();
     i.hasNext ();) {
    WfActivity act = (Activity)i.next ();
    if (act.name().equals ("Run JS")) {
        assertTrue (act.state().equals
        ("closed.completed.abandoned"));
View Full Code Here

        throw new ProcessingException
      (HttpServletResponse.SC_BAD_REQUEST,
       e.getMessage());
    }
    ProcessDirectory procDir = wfs.processDirectory();
    WfProcess proc = null;
    try {
        proc = procDir.lookupProcess(mgr.name(), pl.procKey);
    } catch (InvalidKeyException e) {
        throw new ProcessingException
      (HttpServletResponse.SC_GONE,
View Full Code Here

                        ("unittests.Test1", "ToolTest").size() == 0);
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir
    .processMgr ("simpleApplDirTests", "test1");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
            WfActivity act = null;
      for (Iterator i = process.steps().iterator(); i.hasNext();) {
          act = (WfActivity)i.next ();
          if (act.name().equals("invokeTool")) {
                    break;
          }
      }
View Full Code Here

     */
    public void verifyInit() throws Exception {
  Basic.importProcessDefinitions("/process/testXPDL.xml");
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData procData = process.processContext ();
  assertTrue (procData.containsKey("testValue"));
  assertTrue (procData.get("testValue").equals ("42"));
    }
View Full Code Here

     * Check change data.
     */
    public void modifyData() throws Exception {
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData pd = new DefaultProcessData ();
  pd.put ("testValue", "modifiedValue");
  process.setProcessContext (pd);
  ProcessData procData = process.processContext ();
  assertTrue (procData.get("testValue").equals ("modifiedValue"));
  boolean caught = false;
  pd.clear ();
  pd.put ("Test key", "42");
  try {
      process.setProcessContext (pd);
  } catch (InvalidDataException inv) {
      caught = true;
  }
  assertTrue (caught);
    }
View Full Code Here

  for (Iterator i = oldProcs.iterator(); i.hasNext ();) {
      procDir.removeProcess ((Process)i.next());
  }

  // Create some processes, first with null data item
  WfProcess null1 = pmgr.createProcess(req);
  WfProcess null2 = pmgr.createProcess(req);
  null2.start (); // start one to show it makes no difference

  // Now with value item
  ProcessData pd = new DefaultProcessData ();
  pd.put ("testValue", "Find this");
  WfProcess procThis1 = pmgr.createProcess(req);
  procThis1.setProcessContext (pd);
  WfProcess procThis2 = pmgr.createProcess(req);
  procThis2.setProcessContext (pd);
  WfProcess procThis3 = pmgr.createProcess(req);
  procThis3.setProcessContext (pd);

  pd.put ("testValue", "Find that");
  WfProcess procThat1 = pmgr.createProcess(req);
  procThat1.setProcessContext (pd);
  WfProcess procThat2 = pmgr.createProcess(req);
  procThat2.setProcessContext (pd);

  // very long value item
  String dummyText = "Streng dem definierten Wesen des Blindtextes "
      + "folgend, fungiere ich als solcher und gebe mich unverbindlich "
      + "inhaltsleer. In bedr�ckender Enge in vorgefertigte Masken "
      + "gepresst friste ich ein freudloses Dasein auf dem schmalen "
      + "Grat zwischen Nichtbeachtung und Bedeutungslosigkeit und habe "
      + "doch eine Bitte: Handeln Sie Sinn stiftend f�r meine Existenz "
      + "und lesen Sie mich.";
  pd.put ("testValue", dummyText);
  WfProcess procLong = pmgr.createProcess(req);
  procLong.setProcessContext (pd);

  // Do tests
  Collection c = pmgr.findByDataItem("testValue", null);
  assertTrue (c.size () == 2);
  c = toKeys (c);
  assertTrue (c.contains(null1.key()));
  assertTrue (c.contains(null2.key()));

  c = pmgr.findByDataItem ("testValue", "Find this");
  assertTrue (c.size () == 3);
  c = toKeys (c);
  assertTrue (c.contains(procThis1.key ()));
  assertTrue (c.contains(procThis2.key ()));
  assertTrue (c.contains(procThis3.key ()));
 
  c = pmgr.findByDataItem ("testValue", "Find that");
  assertTrue (c.size () == 2);
  c = toKeys (c);
  assertTrue (c.contains(procThat1.key ()));
  assertTrue (c.contains(procThat2.key ()));

  c = pmgr.findByDataItem ("testValue", dummyText);
  assertTrue (c.size () == 1);
  c = toKeys (c);
  assertTrue (c.contains(procLong.key ()));

  // Cleanup
  oldProcs = pmgr.processes();
  for (Iterator i = oldProcs.iterator(); i.hasNext ();) {
      procDir.removeProcess ((Process)i.next());
View Full Code Here

  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir
    .processMgr ("jellytests", "basicTest");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
      workflowService.release (procDir);
View Full Code Here

  pdd.importProcessDefinitions(sb.toString());
    }

    public void runTest () throws Exception {
        WfRequester req = new DefaultRequester (workflowService());
  WfProcess process = createProcess
      ("testByAudit2", "testByAudit_emptySeq_na", req);
  assertTrue(process!=null);
  process.start ();
  assertTrue (stateReached (process, "closed"));
    }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.omgcore.WfProcess

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.