Package de.danet.an.workflow.tools.util

Examples of de.danet.an.workflow.tools.util.SimpleApplicationDirectory


     */
    public void findByKey () throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
  try {
            SimpleApplicationDirectory ad
                = (SimpleApplicationDirectory)workflowService
                .executeBatch(new SimpleApplicationDirectoryLookup());
            assertTrue (ad.infosByKey
                        ("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;
          }
      }
      assertTrue (act != null);
            assertTrue (stateReached(act, "open.running"));
            Thread.sleep(1000);

            assertTrue (ad.infosByApplication("unittests.Test1").size() == 1);
            Collection infos
                = ad.infosByKey("unittests.Test1", "ToolTest");
            assertTrue (infos.size() == 1);
            SimpleApplicationInfo info
                = (SimpleApplicationInfo)infos.iterator().next();
            assertTrue (info.state() instanceof Object[]);
            WfActivity actFound = workflowService.processDirectory()
                .lookupActivity(info.activityUniqueKey());
            actFound.complete ();
            ad.removeInstance(info.id());
           
            assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.tools.util.SimpleApplicationDirectory

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.