Пример #1
0
        private void instantiateOper(String handle_id)
        {
            /*ArchComponent archComponent = HPCStormObjectRepository
             *              .getWorkflowEngine().getArchComponentByID(
             *                              Integer.parseInt(compId));
             * System.out.println("wait instantiate=> archComponent: ["+archComponent.getId()+"]" + archComponent.getName());
             */
            CertifierConsoleLogger.write("wait instantiate => " + "HandleID" + handle_id);

            LogicActionInstantiate l = null;

            if (!Certifier.InstantiateActions.ContainsKey(handle_id))
            {
                CertifierConsoleLogger.write("Fatal Error: Waiting for inexistent handleID. handle_id: " + handle_id);
                System.Environment.Exit(0);
            }
            else
            {
                l = (LogicActionInstantiate)Certifier.InstantiateActions[handle_id];
            }



            l._thread.Join();

            //System.out.println("ACTION! " + "instantiate "+ compId);
        }
        private void instatiateOper(String compId)
        {
            /*ArchComponent archComponent = HPCStormObjectRepository
             *              .getWorkflowEngine().getArchComponentByID(
             *                              Integer.parseInt(compId));
             * System.out.println("invoke instantiate=> archComponent: ["+archComponent.getId()+"]" + archComponent.getName());*/
            CertifierConsoleLogger.write("perform instantiate => " + "CompID " + compId);

            string handle_fake = "handle perform " + compId;
            LogicActionInstantiate l;

            //	if(!Certifier.InstantiateActions.ContainsKey(handle_fake)){
            l = new LogicActionInstantiate(compId, handle_fake);

            Certifier.InstantiateActions.TryAdd(handle_fake, l);

            /*	}else{
             *
             *              l= (LogicActionInstantiate)Certifier.InstantiateActions[compId];
             *              //l =  new LogicActionInstantiate(compId, Certifier.tacticalCommand);
             *      }*/


            l.run();
        }
Пример #3
0
        private void instantiateOper(String compId, string handle_id)
        {
            /*ArchComponent archComponent = HPCStormObjectRepository.getWorkflowEngine().getArchComponentByID(Integer.parseInt(compId));
             * System.out.println("start instantiate=> archComponent: ["+archComponent.getId()+"]" + archComponent.getName());
             */
            CertifierConsoleLogger.write("start instantiate => " + "CompID " + compId + " handleid informed " + handle_id);

            LogicActionInstantiate l;

            if (!Certifier.InstantiateActions.ContainsKey(handle_id))
            {
                //if (compId.Equals("1")){// call alt-ergo
                l = new LogicActionInstantiate(compId, handle_id);
                //else{// call z3

                //		l =  new LogicActionInstantiate(compId, Certifier.tacticalCommand2);
                //		}


                Certifier.InstantiateActions.TryAdd(handle_id, l);
            }
            else
            {
                l = (LogicActionInstantiate)Certifier.InstantiateActions[handle_id];

                CertifierConsoleLogger.write("HandleId already exists. Waiting for respective action to finish in order to create a new one.");
                l._thread.Join();
                CertifierConsoleLogger.write("Previous action finished! Creating a new one.");


                //			if (compId.Equals("1")){// call alt-ergo
                l = new LogicActionInstantiate(compId, handle_id);
                //				else{// call z3

                //					l =  new LogicActionInstantiate(compId, Certifier.tacticalCommand2);
                //				}

                Certifier.InstantiateActions.TryUpdate(handle_id, l, Certifier.InstantiateActions[handle_id]);
            }


            l.start();


            //System.out.println("ACTION! " + "instantiate "+ compId);
        }
        private void instantiateOper(String handle_id)
        {
            /*ArchComponent archComponent = HPCStormObjectRepository
             *              .getWorkflowEngine().getArchComponentByID(
             *                              Integer.parseInt(compId));
             * System.out.println("ACTION: " + archComponent);*/

            CertifierConsoleLogger.write("cancel instantiate ==> " + "handle_id " + handle_id);

            LogicActionInstantiate l = null;

            if (!Certifier.InstantiateActions.ContainsKey(handle_id))
            {
                CertifierConsoleLogger.write("Fatal Error: Cancelling inexistent handle_id: handle_id  " + handle_id);
                System.Environment.Exit(0);
            }
            else
            {
                l = (LogicActionInstantiate)Certifier.InstantiateActions[handle_id];
            }


            l._thread.Interrupt();
        }