Package de.danet.an.workflow.localapi

Examples of de.danet.an.workflow.localapi.ActivityLocal


  if ((req instanceof SubProcRequester)
      && (((SubProcRequester)req).execution()
    == SubFlowImplementation.SYNCHR)) {
      String key = ((SubProcRequester)req).requestingActivity();
      try {
    ActivityLocal act = lookupActivityLocal (key);
    if (act.typedState() != RunningState.ABANDONING
        && act.typedState() != ClosedCompletedState.ABANDONED) {
        ProcessData res = processContext();
        FormalParameter[] fps
      = processDefinition().formalParameters();
        ProcessData pd = new ProcessDataWithParams (fps);
        for (int i = 0; i < fps.length; i++) {
      FormalParameter fp = fps[i];
      if (fp.mode() == FormalParameter.Mode.IN) {
          continue;
      }
      String fpn = fps[i].id();
      pd.put (fpn, res.get (fpn));
        }
        act.setResult (pd);
        act.complete ();
    }
      } catch (InvalidKeyException e) {
    logger.warn (toString() + " cannot notify requesting activity "
           + key + " : " + e.getMessage ());
      } catch (InvalidDataException e) {
View Full Code Here


        // 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;
      }
        }
View Full Code Here

     * provided by the domain layer.
     * @param key the block activity key
     * @return the block activity representation
     */
    protected ActivityLocal blockActivityRepresentation (String key) {
  ActivityLocal act = (ActivityLocal)baRepresentations.get (key);
  if (act == null) {
      act = new BAForExceptionHandling (key);
      baRepresentations.put (key, act);
  }
  return act;
View Full Code Here

   String transId, String fromId, String toId,
   String condType, String condExpr, String blkActId) {
  // find associated "from"-activities
  int order = evalTransitionOrder(transId, fromId, trefsMap);

  ActivityLocal fromAct = (ActivityLocal)actIdMap.get(fromId);
  BAForProcessInstantiation fromBA = null;
  List fromActivities = new ArrayList();
  if (fromAct instanceof BlockActivity) {
      // we do not generate exception transitions from block
      // internals to block externals
      if (condExpr != null
    && (condType.equals ("EXCEPTION")
        || condType.equals ("DEFAULTEXCEPTION"))) {
    fromActivities.add
        (blockActivityRepresentation(fromAct.key()));
      } else {
    fromBA = (BAForProcessInstantiation)fromAct;
    fromActivities.addAll (fromBA.exitActivities());
      }
  } else {
      fromActivities.add (fromAct);
  }
     
  ActivityLocal toAct = (ActivityLocal)actIdMap.get(toId);
  BAForProcessInstantiation toBA = null;
  List toActivities = new ArrayList();
  if (toAct instanceof BlockActivity) {
      toBA = (BAForProcessInstantiation)toAct;
      toActivities.addAll (toBA.entryActivities ());
  } else {
      toActivities.add (toAct);
  }

  // create all the possible transitions
  for (Iterator fromIt = fromActivities.iterator(); fromIt.hasNext();){
      ActivityLocal fa = (ActivityLocal)fromIt.next();
      for (Iterator toIt = toActivities.iterator(); toIt.hasNext();){
    ActivityLocal ta = (ActivityLocal)toIt.next();

    // enhance transition id if block activities are
    // involved
    String id = transId;
    if (blkActId != null) {
        id += "/" + blkActId;
    }
    if (fromBA != null){
        id += "/" + fromBA.setId() + "/"
      + fromBA.getMemberId (fa.key());
    }
    if (toBA != null){
        id += "/" + toBA.setId() + "/"
      + toBA.getMemberId (ta.key());
    }

    // create and register transition(s)
    int ct = Transition.COND_TYPE_CONDITION;
    if (condExpr != null) {
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.localapi.ActivityLocal

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.