Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » "element" attribute for OnEvent elements(is it owned by OnEvent or Variable or s.o. else?)
"element" attribute for OnEvent elements [message #651759] Tue, 01 February 2011 08:48 Go to next message
Christoph is currently offline Christoph
Messages: 21
Registered: September 2010
Junior Member
My BPEL process defines an OnEvent element that in turn uses a variable attribute. To check SA00087 I added element and messageType attributes. The instance for messageType is not obtainable via OnEvent.getMessageType() (which I consider a litte unintuitively), but rather via Variable.getMessage() where Variable is the instance of the variable attribute used by OnEvent. Thus, I assumed that the instance for element is obtainable via Variable.getXSDElement() (as like as with the "normal" Variable element), but it is not. Rather, Variable.getXSDElement() always returns NULL in that case. I don't get the point. Where do I get the instance for the element attribute?
It is not that element is just not resolved. I would get an XSDElementDeclarationProxy in that case. But I get NULL. A little help would be great.

These are the files I used to test the SA rule:
BPEL process: http://pastebin.com/fBqbWeKu
WSDL definition: http://pastebin.com/mKN5EdiA

Re: "element" attribute for OnEvent elements [message #651838 is a reply to message #651759] Tue, 01 February 2011 13:46 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Christoph,

I wish I could offer prizes to people that find bugs like these. Maybe a hearty "congratulations" will do? Wink

Yes, it looks like there is a glaring omission in the way OnEvent is deserialized - the XSDElement is never set ... anywhere. Have a look at ReconciliationBPELReader#setOperationParmsOnEvent(). This creates a Variable (where MessageType and XSDElement are meant to be stored) and attaches it to the OnEvent, but it only handles the "messageType" attribute; the "element" attribute handling is missing.

I have opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003 to track this - expect a fix before the end of the week.

Thanks again for your hard work - it makes my job that much easier Smile

Bob
Re: "element" attribute for OnEvent elements [message #652591 is a reply to message #651838] Fri, 04 February 2011 11:18 Go to previous messageGo to next message
Christoph is currently offline Christoph
Messages: 21
Registered: September 2010
Junior Member
Hmmm, I don't get this.
I added the fixes to OnEvent, OnEventImpl, BPELPackage, BPELPackageImpl, ReconciliationBPELReader, BPELWriter and bpel.ecore. But still I get NULL when calling both, Variable.getXSDElement() and OnEvent.getXSDElement().

First I thought that the "xsdElement" in the bpel.ecore should rather be named "XSDElement", but that didn't help.
Re: "element" attribute for OnEvent elements [message #652610 is a reply to message #652591] Fri, 04 February 2011 12:20 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Oops! I forgot that there was another BPELReader that had the same problem.

ReconciliationBPELReader is used by the editor during XML->model translation and BPELReader is used by the validator - this is probably where you were seeing "null" for the XSDElement.

HTH
Bob
Re: "element" attribute for OnEvent elements [message #652841 is a reply to message #652610] Mon, 07 February 2011 05:27 Go to previous messageGo to next message
Christoph is currently offline Christoph
Messages: 21
Registered: September 2010
Junior Member
But I don't (re)use anything from the validator project.
Re: "element" attribute for OnEvent elements [message #652908 is a reply to message #652841] Mon, 07 February 2011 09:47 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

What are you using to deserialize the XML and create the EMF model?
Re: "element" attribute for OnEvent elements [message #654651 is a reply to message #651759] Wed, 16 February 2011 10:14 Go to previous messageGo to next message
Christoph is currently offline Christoph
Messages: 21
Registered: September 2010
Junior Member
Maybe I found it.

Indeed, there's been an XSDElementProxy created. But it won't be set as the Variable's xsdElement. Why? When one wants to replace an attribute, ReconciliationHelper.replaceAttribute(WSDLElement, String, QName) is called. That method calls getElement() on the element whose attribute needs to be replaced. But in case of a Variable, that element is in fact NULL. Thus, I assume one need's to check whether the current element is an instance of Variable and rather operate on the XSDElement methods.

[Updated on: Wed, 16 February 2011 10:15]

Report message to a moderator

Re: "element" attribute for OnEvent elements [message #658436 is a reply to message #651759] Tue, 08 March 2011 09:13 Go to previous messageGo to next message
Christoph is currently offline Christoph
Messages: 21
Registered: September 2010
Junior Member
Am I right? Bug is still present at my side. :/
Re: "element" attribute for OnEvent elements [message #658515 is a reply to message #658436] Tue, 08 March 2011 14:37 Go to previous message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Sorry, I'm not ignoring you...just busier than a one legged man in an ass kicking contest Wink

I'll try to have a look at this some time this week.
Previous Topic:Running the BPEL Process with the Eclipse Web Service Explorer
Next Topic:Array as input in BPEL
Goto Forum:
  


Current Time: Fri Jul 25 11:22:38 EDT 2014

Powered by FUDForum. Page generated in 0.08249 seconds