Package de.danet.an.workflow.api

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


     * 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/chabacc.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 receiveMessage() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_sender");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      WfActivity sleepAct = null;
View Full Code Here

    /**
     * Test.
     */
    public void sendMessageAfter() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_receiver");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      WfActivity recAct = null;
View Full Code Here

    /**
     * Test.
     */
    public void sendMessageBefore() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_receiver");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      Map pd = new HashMap ();
View Full Code Here

    /**
     * Test.
     */
    public void sendXMLMessage() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_xml_receiver");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      DocumentBuilderFactory df = DocumentBuilderFactory.newInstance ();
View Full Code Here

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

    /**
     * Test.
     */
    public void echo() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_rec_send");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      Map pd = new HashMap ();
View Full Code Here

    /**
     * Test.
     */
    public void echoIndirect() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_rec_send_indirect");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      Map pd = new HashMap ();
View Full Code Here

    /**
     * Test.
     */
    public void closeNotification() throws Exception {
  ProcessDefinitionDirectory procDefDir = null;
  ProcessDirectory procDir = null;
        Channel chan = null;
  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_close_notification");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      process.start();
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.