7 comp = salome.lcc.FindOrLoadComponent( "YACSContainer","YACS" )
8 yacsgen = comp._narrow(YACS_ORB.YACS_Gen)
10 # -----------------------------------------------------------------------------
13 procEx = yacsgen.LoadProc("samples/legendre7.xml")
14 procEx.setExecMode(YACS_ORB.CONTINUE)
17 # --- wait until executor is paused, finished or stopped
22 state = procEx.getExecutorState()
23 isRunning = (state < 304)
24 print "executorState: ", state
27 procEx.saveState("res.xml")
28 numids,names = procEx.getIds()
33 dico[name] = numids[i]
37 print procEx.getOutPortValue(dico["poly_7"],"Pn")
38 print procEx.getInPortValue(dico["poly_7"],"x")
39 print procEx.getInPortValue(dico["poly_7"],"notAPort")
40 print procEx.getInPortValue(dico["Legendre.loopIter"],"nsteps")
42 # -----------------------------------------------------------------------------
43 # --- schema with errors (echoSrv must be launched)
45 procEx = yacsgen.LoadProc("samples/aschema.xml")
46 procEx.setExecMode(YACS_ORB.CONTINUE)
49 # --- wait until executor is paused, finised or stopped
54 state = procEx.getExecutorState()
55 isRunning = (state < 304)
56 print "executorState: ", state
59 procEx.saveState("res2.xml")
60 numids,names = procEx.getIds()
65 dico[name] = numids[i]
69 print procEx.getErrorDetails(dico["c1"])
70 print procEx.getErrorDetails(dico["node13"])
72 # -----------------------------------------------------------------------------
73 # --- schema with errors
75 procEx = yacsgen.LoadProc("samples/triangle5error.xml")
76 procEx.setExecMode(YACS_ORB.CONTINUE)
77 procEx.setStopOnError(1,"execError2.xml")
78 #procEx.unsetStopOnError()
84 state = procEx.getExecutorState()
85 isRunning = (state < 304)
86 print "executorState: ", state
89 #procEx.resumeCurrentBreakPoint()
91 procEx.saveState("res3.xml")
93 # -----------------------------------------------------------------------------
94 # --- schema with breakpoints
96 procEx = yacsgen.LoadProc("samples/legendre7.xml")
97 procEx.setListOfBreakPoints(["Legendre.loopIter.deuxIter.iter2"])
98 procEx.setExecMode(YACS_ORB.STOPBEFORENODES)
104 state = procEx.getExecutorState()
105 isRunning = (state < 304)
106 print "executorState: ", state
109 procEx.saveState("partialExec.xml")
111 procEx = yacsgen.LoadProc("samples/legendre7.xml")
112 procEx.setExecMode(YACS_ORB.CONTINUE)
113 procEx.RunFromState("partialExec.xml")
118 state = procEx.getExecutorState()
119 isRunning = (state < 304)
120 print "executorState: ", state
123 procEx.saveState("finishExec.xml")