public void fire(ActivityNode activityNode)
 {
     //nothing to do
 }
Example #2
0
        protected void buildAffectationsAction(ref List<string> missing, ActivityNode node)
        {
            Action action = ((ActionNode)(node)).Action;

            if (action != null)
            {
                if (action.Kind == "SendSignal")
                {
                    SendSignalAction sendAct = (SendSignalAction)(action);
                    string pname = sendAct.Target.targetName;
                    if (pname != "")
                    {
                        RessourceAssignement ra = organisation.findRessourceAssignement(pname);

                        if (ra != null && ra.Entity != null)
                        {
                            affectations.Add(pname, ra.Entity);
                            sendAct.Target.target = ra.Entity;
                        }
                        else
                        {
                            missing.Add(pname);
                        }
                    }
                }
                else if (action.Kind == "CallOperation")
                {
                    CallOperationAction callAct = (CallOperationAction)(action);
                    InstanceSpecification host = (InstanceSpecification)(agent);
                    Dictionary<string, Operation> opers = host.Classifier.Operations;
                    if (opers.ContainsKey(callAct.Operation.name))
                    {
                        callAct.Operation = opers[callAct.Operation.name];
                    }
                }
                else if (action.Kind == "CallBehavior")
                {
                    /*
                    shared_ptr<CallBehaviorAction> callBeh = shared_dynamic_cast<CallBehaviorAction>(action);
                    map<string, shared_ptr<Operation> > opers = getHost()->getClassifier()->getOperations();
                    map<string, shared_ptr<Operation> >::iterator it = opers.find(callBeh->getOperation()->getName());
                    if (it != opers.end())
                    {
                        callBeh->setBehavior(it->second);
                    }
                    */
                }
                else
                {
                }
            }
        }
Example #3
0
        protected void buildAffectationsObject(ref List<string> missing, ActivityNode node)
        {
            string pname = node.name;

            //  MascaretApplication.Instance.logfile.WriteLine("TRY TO AFFECT OBJECT : " + pname); MascaretApplication.Instance.logfile.Flush();
            RessourceAssignement ra = organisation.findRessourceAssignement(pname);
            if (ra != null && ra.Entity != null)
            {
                affectations.Add(pname, ra.Entity);
                // MascaretApplication.Instance.logfile.WriteLine("SUCCESS TO AFFECT OBJECT : " + pname); MascaretApplication.Instance.logfile.Flush();
            }
            else
            {
                //Parameters::iterator it = _activityParams.find(pname);
                if (activityParams.ContainsKey(pname))
                {
                    affectations.Add(pname, ((InstanceValue)(activityParams[pname])).SpecValue);
                }
                else
                {
                    //    MascaretApplication.Instance.logfile.WriteLine("FAIL TO AFFECT OBJECT : " + pname); MascaretApplication.Instance.logfile.Flush();
                    missing.Add(pname);
                }
            }
        }
Example #4
0
 public void addNode(ActivityNode val)
 {
     val.Activity = this;
     nodes.Add(val);
 }