Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » Problem with adding a "repreatEvery " in a "OnAlarm" BPEL element from code
Problem with adding a "repreatEvery " in a "OnAlarm" BPEL element from code [message #1491066] Fri, 28 November 2014 17:37
Archevo tarek is currently offline Archevo tarekFriend
Messages: 21
Registered: July 2013
Junior Member
Hi,
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
	at org.eclipse.bpel.model.resource.BPELWriter.createBPELElement(BPELWriter.java:2359)
	at org.eclipse.bpel.model.util.ElementFactory$MyBPELWriter.createBPELElement(ElementFactory.java:89)
	at org.eclipse.bpel.model.resource.BPELWriter.expression2XML(BPELWriter.java:1894)
	at org.eclipse.bpel.model.util.ElementFactory$MyBPELWriter.expression2XML(ElementFactory.java:116)
	at org.eclipse.bpel.model.util.ElementFactory.createExpressionElement(ElementFactory.java:546)
	at org.eclipse.bpel.model.impl.OnAlarmImpl.basicSetRepeatEvery(OnAlarmImpl.java:297)
	at org.eclipse.bpel.model.impl.OnAlarmImpl.setRepeatEvery(OnAlarmImpl.java:332)


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;						
  onalr.setRepeatEvery(exp);	


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

Previous Topic:Unknown Error
Next Topic:HTTP Error :500
Goto Forum:
  


Current Time: Sat Nov 11 08:24:42 GMT 2023

Powered by FUDForum. Page generated in 0.01301 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top