Package de.danet.an.workflow.api

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


        }
        if (executing instanceof Activity.ToolImplementation) {
            executor = ((Activity.ToolImplementation)executing).id();
        } else if (executing instanceof Activity.SubFlowImplementation) {
            try {
                ProcessDefinition procDef
                    = wfs.processDefinitionDirectory().lookupProcessDefinition
                    (((Activity.SubFlowImplementation)executing).packageId(),
                     ((Activity.SubFlowImplementation)executing).processId());
                invokedManagerName = procDef.mgrName();
                invokedKey
                    = ((Activity.SubFlowImplementation)executing).processKey();
                executor = wfs.processDirectory()
                    .lookupProcess(invokedManagerName, invokedKey).name();
                executorIsSubprocess = true;
View Full Code Here


      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
    = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
      pdd.removeProcessDefinition("ut-process", "jut1");
      boolean gotEx = false;
      try {
    pd = pdd.lookupProcessDefinition("ut-process", "jut1");
      } catch (Exception ex) {
    gotEx = true;
      }
      assertTrue(gotEx);
      // check the process definition of the process
      ProcessDefinition procDef = process.processDefinition();
      assertTrue(procDef.packageId().equals("ut-process"));
      assertTrue(procDef.processId().equals("jut1"));
      // import the process definition again.
      importProcessDefinitions();
      pd = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
  } finally {
View Full Code Here

            Document newDoc = new Document(rootClone);
            // import process definition and add under processes
            Element newProcesses
          = rootClone.getChild("WorkflowProcesses", namespace);
            newProcesses.addContent(newProcess);
            ProcessDefinition pd = new DefaultProcessDefinition(newDoc);
            // add to resultlist
            resultList.add(pd);
        }
        return resultList;
    }
View Full Code Here

      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
    = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
      pdd.removeProcessDefinition("ut-process", "jut1");
      boolean gotEx = false;
      try {
    pd = pdd.lookupProcessDefinition("ut-process", "jut1");
      } catch (Exception ex) {
    gotEx = true;
      }
      assertTrue(gotEx);
      // check the process definition of the process
      ProcessDefinition procDef = process.processDefinition();
      assertTrue(procDef.packageId().equals("ut-process"));
      assertTrue(procDef.processId().equals("jut1"));
      // import the process definition again.
      importProcessDefinitions();
      pd = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
  } finally {
View Full Code Here

      }

      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
    = pdd.lookupProcessDefinition("N1", "N2");
      assertTrue(pd!=null);
      pdd.removeProcessDefinition("N1", "N2");
      boolean gotEx = false;
      try {
    pd = pdd.lookupProcessDefinition("N1", "N2");
      } catch (Exception ex) {
    gotEx = true;
      }
      assertTrue(gotEx);
      // check the process definition of the process
      ProcessDefinition procDef = process.processDefinition();
      assertTrue(procDef.packageId().equals("N1"));
      assertTrue(procDef.processId().equals("N2"));
      // import the process definition again.
      importProcessDefinitions();
      pd = pdd.lookupProcessDefinition("N1", "N2");
      assertTrue(pd!=null);
  } finally {
View Full Code Here

  StringBuffer sb = new StringBuffer();
  String st;
  while ((st = br.readLine()) != null) {
      sb.append(st + "\n");
  }
  ProcessDefinition pd = new DefaultProcessDefinition (sb.toString());
  assertTrue (pd.packageId().equals ("unittests"));
  assertTrue (pd.packageName().equals ("Initial workflow processes"));
  assertTrue (pd.processId().equals ("account_neu"));
  assertTrue (pd.processName().equals ("Account anlegen"));
  assertTrue (pd.processHeader().packageHeader().xpdlVersion().equals ("0.09"));
  assertTrue (pd.processHeader().packageHeader().vendor().equals ("Danet GmbH, GS AN"));
  assertTrue (pd.processHeader().packageHeader().created().equals ("Sat Aug 24 15:12:01 CEST 2002"));
  assertTrue (pd.processHeader().created().equals ("01.09.2001"));
  assertTrue (pd.processHeader().description().equals ("Anlegen eines Accounts"));
  assertTrue (pd.processHeader().priority().equals ("1"));

  assertTrue (pd.contextSignature()
        .get ("packageString") == String.class);
  assertTrue (pd.contextSignature()
        .get ("packageFloat") == Double.class);
  assertTrue (pd.contextSignature()
        .get ("packageInteger") == Long.class);
  assertTrue (pd.contextSignature()
        .get ("packageDateTime") == Date.class);
  assertTrue (pd.contextSignature()
        .get ("packageBoolean") == Boolean.class);
  assertTrue (pd.contextSignature()
        .get ("packageXML") == org.w3c.dom.Element.class);
  assertTrue ((pd.contextSignature()
         .get ("packageXMLDefined")).getClass().toString(),
        (pd.contextSignature()
         .get ("packageXMLDefined")) instanceof SAXEventBuffer);
  assertTrue (pd.contextSignature()
        .get ("processString") == String.class);

  assertTrue (pd.resultSignature() .get ("formalParam1") == null);
  assertTrue (pd.resultSignature()
        .get ("formalParam2") == String.class);
  assertTrue (pd.resultSignature()
        .get ("formalParam3") == String.class);

  ApplicationDefinition appl
      = (ApplicationDefinition)pd.applicationById("WebForm");
  assertTrue (appl != null);
  assertTrue (appl.description(), appl.description().equals
        ("Bearbeitung einer Aktivit�t �ber ein Web-Formular      "));
  appl = (ApplicationDefinition)pd.applicationById("WebFormPlus");
  assertTrue (appl != null);
  FormalParameter[] fps = appl.formalParameters();
  assertTrue (fps.length == 2);
  Participant p = pd.participantById("currentUser");
  assertTrue (p != null);
  assertTrue (p.getName().equals("Current User"));
  assertTrue (p.getParticipantType() == ParticipantType.HUMAN);
    }
View Full Code Here

  ProcessDefinitionDirectory pdd = null;
  try {
      pdd = workflowService().processDefinitionDirectory ();
      for (Iterator i = pdd.processDefinitions().iterator ();
     i.hasNext ();) {
    ProcessDefinition pd = (ProcessDefinition)i.next ();
    if (pd.packageId().equals ("jelly-test")) {
        pdd.removeProcessDefinition
      (pd.packageName(), pd.processName());
    }
      }
  } finally {
      workflowService().release (pdd);
  }
View Full Code Here

  ProcessDefinitionDirectory pdd = null;
  try {
      pdd = workflowService().processDefinitionDirectory ();
      for (Iterator i = pdd.processDefinitions().iterator ();
     i.hasNext ();) {
    ProcessDefinition pd = (ProcessDefinition)i.next ();
    if (pd.packageId().equals ("jelly-test")) {
        pdd.removeProcessDefinition
      (pd.packageName(), pd.processName());
    }
      }
  } finally {
      workflowService().release (pdd);
  }
View Full Code Here

    /**
     * Returns the process manager which created this process.
     * @return the associated process manager.
     */
    public WfProcessMgr manager () {
  ProcessDefinition def = getPaProcessDef();
        try {
            return new ProcessMgrStub
                (def.packageId(), def.processId(), def.mgrName(), key(),
                 processDefinitionDirectoryHome(),
                 (WfProcessHome)ctx.getEJBHome());
        } catch (ResourceNotAvailableException e) {
            throw new EJBException (e);
        }
View Full Code Here

    protected ProcessDefinition getPaProcessDef() {
  if (paProcessDef != null) {
      return paProcessDef;
  }
  if (paProcessDefSoft != null) {
      ProcessDefinition pd = (ProcessDefinition)paProcessDefSoft.get();
      if (pd != null) {
          return pd;
      }
  }
  ProcessDefinitionDirectoryLocal pdd = null;
  try {
      String def = loadProcDef();
      if (def != null) {
          ProcessDefinition pd = new DefaultProcessDefinition (def);
          paProcessDefSoft = new SoftReference(pd);
          return pd;
      }
            pdd = getProcessDefinitionDirectoryLocal();
      if (xpdlRef != null) {
View Full Code Here

TOP

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

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.