Package de.danet.an.workflow.internalapi

Examples of de.danet.an.workflow.internalapi.ExtActivityLocal


            activityLocalMapCache = new HashMap ();
            try {
                for (Iterator i = activityLocalHome().findByProcess
                         ((Long)ctx.getPrimaryKey()).iterator ();
                     i.hasNext();) {
                    ExtActivityLocal a = (ExtActivityLocal)i.next();
                    cacheActivityLocal (a);
                }
            } catch (FinderException e) {
                throw new EJBException (e);
            } catch (ResourceNotAvailableException e) {
View Full Code Here


     * @param newValue new name.
     */
    public void setName (String newValue) {
  super.setName(newValue);
  for (Iterator i = activitiesLocal().iterator(); i.hasNext();) {
      ExtActivityLocal a = (ExtActivityLocal)i.next();
      a.updateProcessName (newValue);
  }
    }
View Full Code Here

   JoinAndSplitMode joinMode, JoinAndSplitMode splitMode,
   Implementation[] implementation, String performer, List deadlines,
   boolean deferChoiceOnSplit, int auditEventSelection,
   boolean storeAuditEvents) {
  try {
      ExtActivityLocal act = activityLocalHome().create
    ((WfProcessLocal)ctx.getEJBLocalObject(),
                 (Long)ctx.getPrimaryKey(), auditEventBase(),
     blockActId == null ? null : new Long (blockActId),
     priority, name, description, startMode, finishMode,
     joinMode, splitMode, implementation, performer, deadlines,
View Full Code Here

            // local object in order to get process and (maybe) activity
            // in transaction.
      procDir = processDirectoryLocal();
      ProcessLocal proc = procDir.lookupProcessLocal
    (event.processMgrName(), event.processKey());
            ExtActivityLocal actLocal = null;
      if (event.activityKey() != null) {
                actLocal = (ExtActivityLocal)
                    proc.activityByKeyLocal (event.activityKey());
      }
      if (activityHandles) {
    actLocal.handleAuditEvent (event);
      }
      if (processHandles) {
    ((ExtProcessLocal)proc).handleAuditEvent (event);
      }
      if (logger.isDebugEnabled()) {
View Full Code Here

     * @return collection of activities of the process
     */
    public Collection steps() {
        Collection res = new ArrayList ();
        for (Iterator i = stepsLocal().iterator(); i.hasNext();) {
            ExtActivityLocal act = (ExtActivityLocal)i.next();
            res.add (act.toActivity());
        }
        return res;
    }
View Full Code Here

  State s = State.fromString (state);
  Collection returnList = new ArrayList();

  Iterator it = stepsLocal().iterator();
  while (it.hasNext()) {
      ExtActivityLocal act = (ExtActivityLocal)it.next();
      if (act.typedState().isSameOrSubState (s)) {
    returnList.add(act.toActivity());
      }
  }
  return returnList;
    }
View Full Code Here

     */
    public void setDebugEnabled (boolean debug) throws InvalidStateException {
  setPaDebug (debug);
  Iterator it = stepsLocal().iterator();
  while (it.hasNext()) {
      ExtActivityLocal act = (ExtActivityLocal)it.next();
      act.setDebugEnabled (true);
  }
  return;
    }
View Full Code Here

  // now find not completed/not started activities and/or abandon
  Collection openActs = new ArrayList ();
  for (Iterator i = activitiesOfBlockActivity
     (toi.activity.toString ()).iterator (); i.hasNext ();) {
      ExtActivityLocal a = (ExtActivityLocal)i.next ();
      if (a.typedState().isSameOrSubState(OpenState.RUNNING)
    || a.typedState().isSameOrSubState(NotRunningState.SUSPENDED)) {
    openActs.add (a);
    // complete this if deadline is synchronous
    if (dl.getExecution() == Deadline.SYNCHR) {
        a.initiateAbandoning(true, dl.getExceptionName());
        transitionManager().update (a);
    }
      }
  }
  if (openActs.size() > 0) {
View Full Code Here

  if ((req instanceof SubProcRequester)
      && (((SubProcRequester)req).execution()
    == SubFlowImplementation.SYNCHR)) {
      String key = ((SubProcRequester)req).requestingActivity();
      try {
    ExtActivityLocal act = lookupActivityLocal (key);
                act.abortRequester();
      } catch (InvalidKeyException e) {
    logger.warn (toString() + " cannot notify requesting activity "
           + key + " : " + e.getMessage ());
            }
  }
View Full Code Here

      return;
  }
  // start all runnableActivities
  Collection activitiesToStart = tm.startableActivities();
  for (Iterator it = activitiesToStart.iterator(); it.hasNext();) {
      ExtActivityLocal a = (ExtActivityLocal)it.next();
      try {
    String ba = a.blockActivity();
    if (ba != null && tm.isTransitionSource (ba)) {
        // We are about to start an activity that is part
        // of a block activity with exception
        // condition. Find out if it is the first activity
        // to be started in the set.
        boolean isFirst = true;
        for (Iterator i = activitiesOfBlockActivity(ba).iterator();
       i.hasNext ();) {
      ActivityLocal bm = (ActivityLocal)i.next ();
      if (!bm.typedState()
          .isSameOrSubState (NotRunningState.NOT_STARTED)) {
          isFirst = false;
          break;
      }
        }
        if (isFirst) {
      armDeadlines (ba);
        }
    }
    a.start();
      } catch (AlreadyRunningException e) {
    // can't do much about this, shouldn't happen
    logger.error (e.getMessage(), e);
      }
  }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.internalapi.ExtActivityLocal

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.