Package q_impress.pmi.lib.decorators

Examples of q_impress.pmi.lib.decorators.ActivityDecorator


    writer = new PrintWriter(outStream);
    try {
      writeHeader();
     
      // navigate through nodes and create rules
      ActivityDecorator activityDec = translator.getActivityDecorator();
      for (ActivityNode node : activityDec.getNodes()) {
        dispatch(node);
      }
    } finally {
      writer.close();
    }
View Full Code Here


   
    while (!activitiesToAnalyze.equals(activitiesToAnalyze_copy)) {
      activitiesToAnalyze_copy = new HashSet<Activity>(activitiesToAnalyze);
     
      for (Activity act : activitiesToAnalyze_copy) {
        ActivityDecorator actDec = null;
        try {
          actDec = (ActivityDecorator) decFactory.getDecorator(act);
        } catch (ClassNotFoundException e) {
          throw new TranslationException(this, "Unable to compute activities' dependencies.", e);
        } catch (InvalidContextException e) {
          throw new TranslationException(this, "Unable to compute activities' dependencies.", e);
        }
       
        // create or get the info object associated to the activity
        ActivityInfo actInfo = activitiesInfo.get(act);
        if (actInfo == null) {
          actInfo = new ActivityInfo(act, decFactory);
          activitiesInfo.put(act, actInfo);
        }
       
        Set<CallBehaviorAction> invocationActions = actDec.getInvokeActions();
        for (CallBehaviorAction invokeAct : invocationActions) {
          if (invokeAct.getBehavior() instanceof Activity) {
            actInfo.addDependency((Activity) invokeAct.getBehavior());
            activitiesToAnalyze.add((Activity) invokeAct.getBehavior());
          } else throw new TranslationException(this, "Unable to compute activities' dependencies : activity \"" +
View Full Code Here

   * @return the execution tree
   * @throws AnalysisException if the analysis fails.
   */
  public ExecutionTree analyze() throws AnalysisException {
    // create the activity decorator
    ActivityDecorator activityDec = null;
    try {
      activityDec = (ActivityDecorator) decoratorsFactory.getDecorator(activity);
    } catch (InvalidContextException e) {
      throw new AnalysisException("Unable to analyze activity : " + activity.getQualifiedName());
    } catch (ClassNotFoundException e) {
      throw new AnalysisException("Unable to analyze activity : " + activity.getQualifiedName());
    }
   
    // identify initial nodes
    Set<InitialNode> initialNodes = activityDec.getInitialNodes();
    if (initialNodes.size() == 0) throw new AnalysisException("No initial node defined for activity : " + activity.getQualifiedName());
    if (initialNodes.size() > 1) throw new AnalysisException("Multiple initial nodes defined for activity : " + activity.getQualifiedName());
    InitialNode initialNode = initialNodes.iterator().next();
   
    // create a branch explorer for each initial node
View Full Code Here

TOP

Related Classes of q_impress.pmi.lib.decorators.ActivityDecorator

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.