18-08-2014 04:18 PM
Hello,
I found a problem when executing BPMN Simulation using Java API.
I followed this example in VB:
http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mr1AAAQ
Following is my code to run simulation:
"
MegaObject mgScenario= mgRoot.getCollection("~nf2MJYrpq400[Hypothesis]").get("myScenario"); mgScenario.callMethod("Simulate");
"
However this code doesn't run simulation.
Any help will be kindly appreciated.
Thank you.
Lamia
15-12-2014 11:47 AM
26-11-2014 01:45 PM
Hello,
Thank you for your reply.
I did exactly the same on this object:
MegaObject mgScenario= mgRoot.getCollection("~nf2MJYrpq400[Hypothesis]").get("myScenario");
System.out.println(mgScenario.toString());
System.out.println(mgScenario.getID());
System.out.println(mgScenario.getMethodID("Simulate"));
System.out.println(mgScenario.getProp("Name"));
mgScenario.invokeMethod("Simulate");
It prints me all strings and it invoke the methode without exceptions. but the methode does not really run.
It prints all time the same output for different input.
On your side,did the result change after executing this code to different input?
Thank you four your help.
Lamia
04-11-2014 04:46 PM
Hi again,
For me that works completely fine aka. it prints me all strings and it runs the method withour exceptions
MegaCollection websCollection = megaRoot
.getCollection(Hypothesis.ID, sort);
for (MegaObject mo : websCollection) {
System.out.println(mo.toString());
System.out.println(mo.getID());
System.out.println(mo.getMethodID("Simulate"));
System.out.println(mo.getProp("Name"));
mo.invokeMethod("Simulate");
}
20-08-2014 04:29 PM
Hello,
I tried to execute simulation with CallFunction,since Simulate is a function, but it doesn't work.
I tried also to add argument like this:
"mgScenario.callMethod("Simulate", true);"
But simulation did not run.
Any idea?
Thanks!
Lamia
19-08-2014 11:36 AM
Hello,
I don't have error when running this code. But the simulation doesn't run. Infact, ,simulation results doesn't change even when I change the input parameters. However, for this inputs, when I run simulation manually, the output change.
Thank you for your help
19-08-2014 10:44 AM
What error are you getting when you run it?