I got the following exception when trying to add from my code, a 'repeatEvery' (as a timer) loop into a "OnAlarm" Bpel element. I'm using the Eclipse BPEL API org.eclipse.bpel.model version 0.4.0 to read a bepl process and then modify it by adding elements.
Exception in thread "main" java.lang.NullPointerException
It happens when calling the "setRepeatEvery(..)" method.
Hereafter a piece of the code:
Expression exp= (Expression) obj; // obj: is an EObject which contains an" Expression" BPEL element that was created before;
Object bj=new Object(); // here it is just to test
exp.setBody(bj); // here it is just to test
OnAlarm onalr= (OnAlarm) container// container: is an EObject which contains a "OnAlarm" BPEL element that was created before;
I did the same thing whith the "Wait" BPEL element which is of type "Activity" (from the BPEL specification), and i put inside it a "For" loop and it works!!
Why with "OnAlarm" BPEL element which is of type "ExtensibleElement" it doesn't work?!
Any suggestions please?
Thanks in advance.
[Updated on: Sat, 29 November 2014 13:08]
Report message to a moderator