Package de.danet.an.workflow.api

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


            for (; tries > 0; tries--) {
                try {
                    WorkflowServiceFactory wfsf
                        = WorkflowServiceFactory.newInstance ();
                    WorkflowService wfs = wfsf.newWorkflowService();
                    ProcessDefinitionDirectory pdd
                        = wfs.processDefinitionDirectory();
                    pdd.importProcessDefinitions(out.toByteArray());
                    break;
                } catch (FactoryConfigurationError e) {
                    System.err.println
                        ("Problem accessing engine, may not be fully deployed "
                         + "yet. Retrying " + tries + " more time(s). "
View Full Code Here


     * Import the process definitions from a XPDL file
     * unsing the ProcessDefinitionDirectory bean.
     */
    public void importProcessDefinitions() throws Exception {
  // Create process definition directory bean
  ProcessDefinitionDirectory pdd
      = workflowService.processDefinitionDirectory();

  InputStream is = getClass()
      .getResourceAsStream("/tools/extinvocation.xml");
  assertTrue (is != null);
  BufferedReader br = new BufferedReader
      (new InputStreamReader(is, "ISO-8859-1"));
  StringBuffer sb = new StringBuffer();
  String st;
  while ((st = br.readLine()) != null) {
      sb.append(st + "\n");
  }
  pdd.importProcessDefinitions(sb.toString());
  Collection processDefinitions = pdd.processDefinitions();
  assertTrue (processDefinitions.size() > 0);
    }
View Full Code Here

     * Import the process definitions from a XPDL file
     * unsing the ProcessDefinitionDirectory bean.
     */
    public void importProcessDefinitions() throws Exception {
  // Create process definition directory bean
  ProcessDefinitionDirectory pdd
      = workflowService.processDefinitionDirectory();

  InputStream is = getClass().getResourceAsStream("/tools/jstests.xml");
  assertTrue (is != null);
  BufferedReader br = new BufferedReader
      (new InputStreamReader(is, "ISO-8859-1"));
  StringBuffer sb = new StringBuffer();
  String st;
  while ((st = br.readLine()) != null) {
      sb.append(st + "\n");
  }
  pdd.importProcessDefinitions(sb.toString());
  Collection processDefinitions = pdd.processDefinitions();
  assertTrue (processDefinitions.size() > 0);
    }
View Full Code Here

    /**
     * Test.
     */
    public void testAbandon() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  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 ();
View Full Code Here

    /**
     * Test.
     */
    public void testReplacer() throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("jstests", "testReplacer");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            SAXContentBuffer xmlRes = (SAXContentBuffer)
View Full Code Here

    /**
     * Test.
     */
    public void testAUK() throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("jstests", "testAUK");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            String s = (String)process.processContext().get("Result");
View Full Code Here

    /**
     * Test.
     */
    public void testJavaArg1() throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("jstests", "testJavaArg1");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            List l = (List)process.processContext().get("Result");
View Full Code Here

    /**
     * Test.
     */
    public void testJavaArg2() throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("jstests", "testJavaArg2");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            ProcessData data = new DefaultProcessData ();
            List l = new ArrayList();
            data.put("Argument", l);
View Full Code Here

    }

    private WfProcess createProcess
  (String pkgId, String prcId, WfRequester req)
        throws Exception {
  ProcessDefinitionDirectory procDir = null;
  try {
      procDir = workflowService.processDefinitionDirectory();
      ProcessMgr pmgr = procDir.processMgr(pkgId, prcId);
      return pmgr.createProcess (req);
  } finally {
      workflowService.release (procDir);
  }
    }
View Full Code Here

    /**
     * Import the process definitions from a XPDL file
     * unsing the ProcessDefinitionDirectory bean.
     */
    public void importProcessDefinitions() throws Exception {
  ProcessDefinitionDirectory pdd = null;
  try {
      pdd = workflowService().processDefinitionDirectory ();

      InputStream is = getClass()
                .getResourceAsStream("/process/actParamTests.xml");
      assertTrue (is != null);
      BufferedReader br = new BufferedReader
    (new InputStreamReader(is, "ISO-8859-1"));
      StringBuffer sb = new StringBuffer();
      String st;
      while ((st = br.readLine()) != null) {
    sb.append(st + "\n");
      }
      pdd.importProcessDefinitions(sb.toString());
  } finally {
      workflowService().release (pdd);
  }
    }
View Full Code Here

TOP

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

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.