[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [bpel-dev] ExtensionActivity Deserializer problem
|
Hi all,
Thank you all for your help. Thank you Neto figuring out my mistake, but it did not help to fix my problem.
Then I tried sampleStructuredActivity (the example activity). I added a sampleStructuredActivity to the design area and then added another activity into the sampleStructuredActivity. Then it generated following code.
<bpel:extensionActivity>
<extensionsample:sampleStructuredActivity name="SampleStructuredActivity">
<bpel:empty name="Empty"></bpel:empty>
</extensionsample:sampleStructuredActivity>
</bpel:extensionActivity>
Then I save the file and close the BPEL designer and reopen the file using BPEL designer. Then I observed , the Bpel file is changed like this, (similar case like me. :( )
<bpel:extensionActivity>
<extensionsample:sampleStructuredActivity name="SampleStructuredActivity">
</extensionsample:sampleStructuredActivity>
<bpel:empty name="Empty"></bpel:empty> </bpel:extensionActivity>
So I thing, this XML modification problem affects to all the Extensions Activities. Is this a bug or does my bpel designer source out of date?
Thanks & Kind Regards.
On Tue, Jul 19, 2011 at 6:58 PM, Bob Brodt
<bbrodt@xxxxxxxxxx> wrote:
Hi Hasitha,
Neto is on the right track. It looks like you are trying to implement something very similar to the SampleStructuredActivity model in org.eclipse.bpel.extensionsample.model. I would take a close look at this example and follow it carefully.
_______________________________________
Robert ("Bob") Brodt
Senior Software Engineer, JBoss Riftsaw
JBoss by Red Hat
I think that you are missing to overwrite the methods adoptContent and orphanContent. Something like the SampleStructuredActivity (in the example):
@Override
protected void adoptContent(EReference reference, Object object) {
if (object instanceof Activity) {
ReconciliationHelper.replaceChild(this, activity, (Activity) object);
}
super.adoptContent(reference, object);
}
@Override
protected void orphanContent(EReference reference, Object obj) {
if (obj instanceof Activity) {
ReconciliationHelper.orphanChild(this, (Activity)obj);
}
super.orphanContent(reference, obj);
}
Maybe you should do something similar.
Cheers,
neto
On Tue, Jul 19, 2011 at 3:00 PM, Tobias Liefke
<tobias.liefke@xxxxxxxxxxxxx> wrote:
ok, after looking at basicSetRemoteTask , I don't see any problems.
Maybe you should use peopelActivityRT.setElement((Element) paElement.getParentNode()) in HTDeserializer:75 (that is done anyway by the
caller).
Another possibility is to set a breakpoint in ElementPlacer.niceInsertBefore to find out which method (and why) is changing the
DOM.
Tobias
Gesendet: Dienstag, 19. Juli 2011 11:42
An: BPEL Designer project developer discussions.
Betreff: Re: [bpel-dev] ExtensionActivity Deserializer problem
Hi Tobias,
Thank you very much for your help and remarks. I will fix those mistakes
HTDeserializer.
But I cant find the mistake in
PeopleActivityRTImpl. I have implemented the method
PeopleActivityRTImpl.basicSetRemoteTask as follows. I have attached the original code to.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public NotificationChain basicSetRemoteTask(RemoteTask newRemoteTask, NotificationChain msgs) {
RemoteTask oldRemoteTask = remoteTask;
if (!isReconciling) {
ReconciliationHelper.replaceChild(this, oldRemoteTask, newRemoteTask);
}
remoteTask = newRemoteTask;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackage.PEOPLE_ACTIVITY_RT__REMOTE_TASK, oldRemoteTask, newRemoteTask);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
Could you help me to figure out the error.
Thanks & Kind Regards.
On Tue, Jul 19, 2011 at 1:45 PM, Tobias Liefke
<tobias.liefke@xxxxxxxxxxxxx> wrote:
I will try to answer instead of Bob.
The problem is not your Serializer/Deserializer, but your implementation of ExtensionActivity (PeopleActivityRTImpl?). Without knowing that class
I can only guess, that you are using
this.getElement() in
PeopleActivityRTImpl.basicSetRemoteTask(RemoteTask rt) to add the the element of the
remote task. This will add the RemoteTask element to the <bpel:extensionActivity> element, as this is the one which is connected to
an implementation of ExtensionActivity.
Finally some remarks on HTDeserializer:
- A serializer/deserializer must be stateless (your instance variables may lead to unexpected side effects).
- XML is case sensitive. Don't use equalsIgnoreCase when comparing the element name.
- Why are you iterating twice over the list of child nodes?
Tobias
Hi Bob,
I am trying to implement an extensionActivity . This activity generates following XML code.
<bpel:extensionActivity>
<b4p:peopleActivity name="PeopleActivityRT">
<b4p:remoteTask></b4p:remoteTask>
</b4p:peopleActivity>
</bpel:extensionActivity>
But I have found an error when I open a saved bpel file using business process editor. When I open a bpel file using business process editor, it changes like this,
<bpel:extensionActivity>
<b4p:peopleActivity name="PeopleActivityRT">
</b4p:peopleActivity>
<b4p:remoteTask></b4p:remoteTask>
</bpel:extensionActivity>
This is not happened when I open a file using XML editor. So I thing it is a problem of Deserilizer of the extensionActivity. Any Idea about what went wrong ?.
I have attached Deserializer and Serializer classes.
--
Hasitha Aravinda,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
My web portal :
http://hasitha.comze.com
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
--
Hasitha
Aravinda,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri
Lanka.
My web portal :
http://hasitha.comze.com
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
--
Hasitha Aravinda,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
My web portal : http://hasitha.comze.com