Skip to main content


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 13:48 Go to next message
Christoph is currently offline ChristophFriend
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 18:46 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
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 16:18 Go to previous messageGo to next message
Christoph is currently offline ChristophFriend
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 17:20 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
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 10:27 Go to previous messageGo to next message
Christoph is currently offline ChristophFriend
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 14:47 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
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 15:14 Go to previous messageGo to next message
Christoph is currently offline ChristophFriend
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 15:15]

Report message to a moderator

Re: "element" attribute for OnEvent elements [message #658436 is a reply to message #651759] Tue, 08 March 2011 14:13 Go to previous messageGo to next message
Christoph is currently offline ChristophFriend
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 19:37 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
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:XML output of BPEL generation.
Next Topic:Array as input in BPEL
Goto Forum:
  


Current Time: Tue Mar 19 09:05:22 GMT 2024

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

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

Back to the top