Package de.danet.an.workflow.api

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


    /**
     * Try to create the process identified by the id
     */
    public WfProcess createProcess (String pkgId, String prcId)
        throws Exception {
  ProcessDefinitionDirectory pdd = null;
  try {
      pdd = workflowService().processDefinitionDirectory();
      WfProcessMgr pmgr = pdd.processMgr(pkgId, prcId);
      return pmgr.createProcess (new DefaultRequester(workflowService()));
  } finally {
      workflowService().release (pdd);
  }
    }
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/exceptiontest.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("/process/testXPDL.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 defaultMapping () throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir
    .processMgr ("ExceptionTests", "defaultMapping");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
View Full Code Here

    /**
     * Test.
     */
    public void overrideMapping () throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir
    .processMgr ("ExceptionTests", "overrideMapping");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.terminated"));
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

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

    /**
     * Test.
     */
    public void suspendMapping () throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir
                .processMgr ("ExceptionTests", "suspendMapping");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            Activity toolAct = null;
View Full Code Here

    /**
     * Test.
     */
    public void suspendMapping2 () throws Exception {
        ProcessDefinitionDirectory procDefDir = null;
        ProcessDirectory procDir = null;
        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir
                .processMgr ("ExceptionTests", "suspendMapping");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            Activity toolAct = null;
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

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.