Package de.danet.an.workflow.omgcore

Examples of de.danet.an.workflow.omgcore.WfRequester


     * 2.) remove closed process
     * Please note definitions matching the (logical) code flow, e.g. start and
     * finish mode of the corresponding activities.
     */
    public void removejut1() throws Exception {
  WfRequester req = new DefaultRequester(workflowService);
  // create the process
  Process process = (Process)(createProcess("ut-process", "jut1", req));
  assertTrue(process.state().equals("open.not_running.not_started"));
  // start the process
  process.start();
View Full Code Here


     * A process can be removed automatically only if its state is CLOSED and
     * the extendedAttribute of removeClosedProcess in procss definition is
     * AUTOMATIC (Default: AUTOMATIC).
     */
    public void removeClosedProcessjut1() throws Exception {
  WfRequester req = new DefaultRequester(workflowService);
  ProcessDirectory procDir = processDirectory();
  // create the process
  Process process = (Process)(createProcess("ut-process", "jut5", req));
  String processKey = process.key();
  assertTrue(process.state().equals("open.not_running.not_started"));
View Full Code Here

    /**
     * Test association of process and requester.
     */
    public void testAssoc() throws Exception {
  EventLogger evtlog1 = new EventLogger();
  WfRequester cont1
      = new DefaultRequester(workflowService(), evtlog1);
  Process proc1a = (Process)createProcess("ut-process", "jut1", cont1);
  assertTrue (proc1a.requester().equals (cont1));
  Process proc1b = (Process)createProcess("ut-process", "jut1", cont1);
  assertTrue (proc1b.requester().equals (cont1));
  EventLogger evtlog2 = new EventLogger();
  WfRequester cont2 = new DefaultRequester(workflowService(), evtlog2);
  assertTrue (!cont2.equals (cont1));
  Process proc2 = (Process)createProcess("ut-process", "jut1", cont2);
  assertTrue (proc2.requester().equals (cont2));
  Collection c1 = cont1.performers();
  assertTrue (c1.size() == 2);
  boolean foundA = false
View Full Code Here

     */
    public void receiveEvent (WfAuditEvent evt)
  throws InvalidPerformerException, RemoteException {
  try {
      String procKey = evt.processKey();
      WfRequester requester = null;
      synchronized (this) {
    WeakReference requesterRef
        = (WeakReference)reqsByProcKey.get(procKey);
    if (requesterRef != null) {
        requester = (WfRequester)requesterRef.get();
    }
    if (requester == null) {
        // if we know that none of ours handles it, discard
        if (ignoredProcs.contains (procKey)) {
      return;
        }
        // try to find handler
        found:
        for (Iterator i = procKeysByReq.keySet().iterator();
       i.hasNext();) {
      WeakReference reqRef = (WeakReference)i.next();
      WfRequester req = (WfRequester)reqRef.get();
      if (req == null) {
          continue;
      }
      Set assocKeys = (Set)procKeysByReq.get (reqRef);
      Collection perfs = ((WfRequester)req).performers();
View Full Code Here

     */
    public void jellyArg() throws Exception
  ProcessDirectory pd = null;
  try {
      pd = workflowService().processDirectory ();
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess
    ("actParamTests", "jelly-test1", cont);
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      SAXEventBuffer res = (SAXEventBuffer)
View Full Code Here

     */
    public void e4xArg() throws Exception {  
        ProcessDirectory pd = null;
        try {
            pd = workflowService().processDirectory ();
            WfRequester cont = new DefaultRequester(workflowService());
            Process process = (Process)createProcess
                ("actParamTests", "testE4xActParam", cont);
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            SAXContentBuffer res = (SAXContentBuffer)
View Full Code Here

     */
    public void test1() throws Exception
  ProcessDirectory pd = null;
  try {
      pd = workflowService().processDirectory ();
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess
    ("jelly-test", "jelly-test1", cont);
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      SAXEventBuffer res = (SAXEventBuffer)
View Full Code Here

     * Create a new process and then remove its process definition.
     */
    public void createProcessAndRemoveProcessDef() throws Exception
  ProcessDefinitionDirectory pdd = null;
  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("N1", "N2", cont);
      process.start();
      Thread.sleep(5000);

      // get processdata
View Full Code Here

    /**
     * Check initialized data.
     */
    public void verifyInit() throws Exception {
  Basic.importProcessDefinitions("/process/testXPDL.xml");
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData procData = process.processContext ();
  assertTrue (procData.containsKey("testValue"));
  assertTrue (procData.get("testValue").equals ("42"));
View Full Code Here

 
    /**
     * Check change data.
     */
    public void modifyData() throws Exception {
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData pd = new DefaultProcessData ();
  pd.put ("testValue", "modifiedValue");
  process.setProcessContext (pd);
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.omgcore.WfRequester

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.