Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » Use of org.eclipse.bpel.common.model
Use of org.eclipse.bpel.common.model [message #2688] Fri, 10 February 2006 08:44 Go to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 00300AECC1257111_=
Content-Type: text/plain; charset="US-ASCII"

Hi,

I have had a look at the initial code of the editor especially the model
as I was looking for the model extension hooks. I suppose the extension
points are not specified yet, is that right? I see serializer and
deserializer interfaces for extensions but not registration facility (EP)
for them. Anyways, my question is more focussed on the plugin
org.eclipse.bpel.common.model. It looks like it is an extension model.
However I can not really see how that would interact with the BPEL model
and how one would use it. Or what is the purpose ? :-)

Speaking of extensions and extensibility I have another question/request.
Given there will be a notification mechanism for third party extensions to
the model I would like to see a mechanism that not only allows for
tracking changes in the model but also hook in to a command that is
executed. The scenario is the following: I have an extension to the model
(e.g. a new activity). Now I would like to get notified about changes in
the bpel model to update my model respectively. In order to update my
model I would like to "participate" in a command for the reason that the
whole change (bpel model and my model) would appear as one change
(transaction) and even more important could be rolled back simply undoing
the whole command.

Is there any plan do implement sth like that ?

Thx so far,

Regards,
--Philipp
--=_alternative 00300AECC1257111_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I have had a look at the initial code
of the editor especially the model as I was looking for the model extension
hooks. I suppose the extension points are not specified yet, is that right?
I see serializer and deserializer interfaces for extensions but not registration
facility (EP) for them. Anyways, my question is more focussed on the plugin
org.eclipse.bpel.common.model. It looks like it is an extension model.
However I can not really see how that would interact with the BPEL model
and how one would use it. Or what is the purpose ? :-)</font>
<br>
<br><font size=2 face="sans-serif">Speaking of extensions and extensibility
I have another question/request. Given there will be a notification mechanism
for third party extensions to the model I would like to see a mechanism
that not only allows for tracking changes in the model but also hook in
to a command that is executed. The scenario is the following: I have an
extension to the model (e.g. a new activity). Now I would like to get notified
about changes in the bpel model to update my model respectively. In order
to update my model I would like to &quot;participate&quot; in a command
for the reason that the whole change (bpel model and my model) would appear
as one change (transaction) and even more important could be rolled back
simply undoing the whole command. </font>
<br>
<br><font size=2 face="sans-serif">Is there any plan do implement sth like
that ?</font>
<br>
<br><font size=2 face="sans-serif">Thx so far,</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br><font size=2 face="sans-serif">--Philipp</font>
--=_alternative 00300AECC1257111_=--
Re: Use of org.eclipse.bpel.common.model [message #2709 is a reply to message #2688] Mon, 13 February 2006 19:17 Go to previous messageGo to next message
James Moody is currently offline James MoodyFriend
Messages: 61
Registered: July 2009
Member
Hi Philipp!

philipp_tiedt@de.ibm.com wrote:
>
> Hi,
>
> I have had a look at the initial code of the editor especially the model
> as I was looking for the model extension hooks. I suppose the extension
> points are not specified yet, is that right? I see serializer and
> deserializer interfaces for extensions but not registration facility
> (EP) for them. Anyways, my question is more focussed on the plugin
> org.eclipse.bpel.common.model. It looks like it is an extension model.
> However I can not really see how that would interact with the BPEL model
> and how one would use it. Or what is the purpose ? :-)

In the BPEL editor, we sometimes need to persist visual information and
hints. For obvious reasons, we don't want to put these into the BPEL
file. Instead we chose an extensions file (in our case, our .bpelex
file). The common.model plug-in is a general extension model framework
for xmi-serialized extension models which live in a separate file from
the main file yet which is semantically linked to the model elements.
Our particular instantiation of this framework lives in the
org.eclipse.bpel.ui, in the *.uiextensionmodel packages - this small
model (a) sits on top of the common.model framework, (b) holds UI hints
for the bpel, and (c) [de]serializes to the .bpelex file. For examples
of how these extensions are used, have a look in BPELEditor, and look at
usages of the class ExtensionMap within the editor. If you have any
questions about this please let me know.

Regarding the general model extensions for bpel (that is, for actual
syntactic extensions that live in the bpel file), our support will be
evolving as we progress through the milestone plan, but right now it
should be possible to add new activities, new extensibility elements to
existing activities (and other elements), and to display these in the
UI. For more information about the current support, have a look at the
design documents on the BPEL web page (www.eclipse.org/bpel/), and feel
free to ask questions here. I'll also mention that our model now
implements OASIS issue 111 regarding a new syntax for extension
activities. We haven't tried adding UI for an activity specified in such
a way, but I don't know of any reason why it wouldn't work. If you see
any issues please let us know as we're most interested in making this work.

> Speaking of extensions and extensibility I have another
> question/request. Given there will be a notification mechanism for third
> party extensions to the model I would like to see a mechanism that not
> only allows for tracking changes in the model but also hook in to a
> command that is executed. The scenario is the following: I have an
> extension to the model (e.g. a new activity). Now I would like to get
> notified about changes in the bpel model to update my model
> respectively. In order to update my model I would like to "participate"
> in a command for the reason that the whole change (bpel model and my
> model) would appear as one change (transaction) and even more important
> could be rolled back simply undoing the whole command.
>
> Is there any plan do implement sth like that ?

I just chatted about this with Wylie, and I'll leave it to him to follow
up on some ideas he had.

james
Re: Use of org.eclipse.bpel.common.model [message #3090 is a reply to message #2709] Mon, 13 February 2006 20:44 Go to previous messageGo to next message
Wylie Garvin is currently offline Wylie GarvinFriend
Messages: 1
Registered: July 2009
Junior Member
philipp_tiedt@de.ibm.com wrote:
>
> Speaking of extensions and extensibility I have another
> question/request. Given there will be a notification mechanism for
> third party extensions to the model I would like to see a mechanism
> that not only allows for tracking changes in the model but also hook
> in to a command that is executed. The scenario is the following: I
> have an extension to the model (e.g. a new activity). Now I would like
> to get notified about changes in the bpel model to update my model
> respectively. In order to update my model I would like to
> "participate" in a command for the reason that the whole change (bpel
> model and my model) would appear as one change (transaction) and even
> more important could be rolled back simply undoing the whole command.
>
> Is there any plan do implement sth like that ?

I thought I had an ad-hoc solution that would work for now, but while
typing it up I realized it won't work!

I think we do need this functionality but I'm not sure what it would
look like. It would probably take the form of an API method you can
call which accepts your own Command object, and somehow "appends" it to
the work being done by the current Command so that it is executed at the
end, and undone/redone in order. I've just logged a bug about this
(127543).
Re: Use of org.eclipse.bpel.common.model [message #3115 is a reply to message #3090] Tue, 14 February 2006 11:56 Go to previous messageGo to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 00419CD3C1257115_=
Content-Type: text/plain; charset="US-ASCII"

Hi Wylie,

this would imply to modify the command stack after the current command has
been executed, right ? E.g. replacing the current command with a compound
command (that includes the current and the secondary cmd in the right
order).

This is just a thought and maybe that is the idea you dropped before, but
how about having a notification framework where extensions can register
and get notified just before a certain command is executed. As all changes
in the editor are done by commands anyway you wouldnt loose any
information in terms of what will be changend and what is the old value.
As an extension I could then decide whether to add modification commands
to the current command before its executed. You might even allow
extensions for discarding the current command (in case that is a use
case). Should this be discussed in the bugzilla tool rather than here?

Philipp
--=_alternative 00419CD3C1257115_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Wylie,</font>
<br>
<br><font size=2 face="sans-serif">this would imply to modify the command
stack after the current command has been executed, right ? E.g. replacing
the current command with a compound command (that includes the current
and the secondary cmd in the right order). </font>
<br>
<br><font size=2 face="sans-serif">This is just a thought and maybe that
is the idea you dropped before, but how about having a notification framework
where extensions can register and get notified just before a certain command
is executed. As all changes in the editor are done by commands anyway you
wouldnt loose any information in terms of what will be changend and what
is the old value. As an extension I could then decide whether to add modification
commands to the current command before its executed. You might even allow
extensions for discarding the current command (in case that is a use case).
Should this be discussed in the bugzilla tool rather than here?</font>
<br>
<br><font size=2 face="sans-serif">Philipp</font>
--=_alternative 00419CD3C1257115_=--
Re: Use of org.eclipse.bpel.common.model [message #3183 is a reply to message #2709] Mon, 20 February 2006 13:31 Go to previous messageGo to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 004A4C90C125711B_=
Content-Type: text/plain; charset="US-ASCII"

Hi James,

according to the OASIS issue 111 I suppose the pattern to introduce a new
activity is to have an <extensionActivity> element including one
<extensibilityElement> compared to the former approach of having an
<invoke> element including one <extensibilityElement>.

However the current editor code (I just extracted it one sec ago :-) )
still focusses on the old (invoke) approach especially when checking for
customactivities. In Detail I refer to the method
BPELUtil.getEClassFor(Object target)

public static EClass getEClassFor(Object target) {
if (target instanceof Invoke) {
ActionDescriptor[] descriptors =
BPELUIRegistry.getInstance().getActionDescriptors();
for (int i = 0; i < descriptors.length; i++) {
AbstractBPELAction action =
descriptors[i].getAction();
if (action.isInstanceOf(target)) {
return action.getModelType();
}
}
}
if (!(target instanceof EObject)) {
return null;
}
return ((EObject)target).eClass();
}

and the method BPELUtil.isCustomActivity(Object target)

public static boolean isCustomActivity(Object target) {
if (target instanceof Invoke) {
ActionDescriptor[] descriptors =
BPELUIRegistry.getInstance().getActionDescriptors();
for (int i = 0; i < descriptors.length; i++) {
AbstractBPELAction action =
descriptors[i].getAction();
if (action.getModelType() ==
BPELPackage.eINSTANCE.getInvoke()) continue;
if (action.isInstanceOf(target)) {
return true;
}
}
}
return false;
}

Is that old code that I have or is it used to be "backward compatible" or
is it just not changed yet.

At the moment I can not see how to provide an adapter for my
customactivities (when included in extensionActivity elements). Well I can
provide an AdapterFactory through my implementation of AbstractBPELAction.
However, this factory is than associated with the EClass returned by my
implementation ofgetModelType() (AbstractBPELAction). At this point this
key-value pair is lost as due to the current getEClassFor(Object target)
implementation (In case of ExtensionActivity it would just return that
EClass but not ask the BPEL Action descriptors). The only way for me at
the moment is to register a factory for ExtensionActivity but that makes
no sense as extensibility would be gone :-).

Am I missing sth ?

Thx in advance

Philipp
--=_alternative 004A4C90C125711B_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi James,</font>
<br>
<br><font size=2 face="sans-serif">according to the OASIS issue 111 I suppose
the pattern to introduce a new activity is to have an &lt;extensionActivity&gt;
element including one &lt;extensibilityElement&gt; compared to the former
approach of having an &lt;invoke&gt; element including one &lt;extensibilityElement&gt;.
<br>
<br>
However the current editor code (I just extracted it one sec ago :-) )
still focusses on the old (invoke) approach especially when checking for
customactivities. In Detail I refer to the method BPELUtil.getEClassFor(Object
target) <br>
<br>
public static EClass getEClassFor(Object target) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; if (target instanceof Invoke) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; ActionDescriptor[] descriptors = BPELUIRegistry.getInstance().getActionDescriptors();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; descriptors.length; i++) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AbstractBPELAction action = descriptors[i].getAction();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if (action.isInstanceOf(target)) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; return action.getModelType();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
}</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; if (!(target instanceof EObject)) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; return null;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; return ((EObject)target).eClass();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; }</font>
<br>
<br><font size=2 face="sans-serif">and the method BPELUtil.isCustomActivity(Object
target)</font>
<br>
<br><font size=2 face="sans-serif">public static boolean isCustomActivity(Object
target) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; if (target
instanceof Invoke) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; ActionDescriptor[] descriptors = BPELUIRegistry.getInstance().getActionDescriptors();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; descriptors.length; i++) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AbstractBPELAction action = descriptors[i].getAction();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (action.getModelType() == BPELPackage.eINSTANCE.getInvoke())
continue;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if (action.isInstanceOf(target)) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; return true;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
}</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; return false;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; }
</font>
<br>
<br><font size=2 face="sans-serif">Is that old code that I have or is it
used to be &quot;backward compatible&quot; or is it just not changed yet.
<br>
<br>
At the moment I can not see how to provide an adapter for my customactivities
(when included in extensionActivity elements). Well I can provide an AdapterFactory
through my implementation of AbstractBPELAction. However, this factory
is than associated with the EClass returned by my implementation ofgetModelType()
(AbstractBPELAction). At this point this key-value pair is lost as due
to the current getEClassFor(Object target) implementation (In case of ExtensionActivity
it would just return that EClass but not ask the BPEL Action descriptors).
The only way for me at the moment is to register a factory for ExtensionActivity
but that makes no sense as extensibility would be gone :-). </font>
<br><font size=2 face="sans-serif"><br>
Am I missing sth ? </font>
<br><font size=2 face="sans-serif"><br>
Thx in advance</font>
<br><font size=2 face="sans-serif"><br>
Philipp </font>
--=_alternative 004A4C90C125711B_=--
Re: Use of org.eclipse.bpel.common.model [message #3312 is a reply to message #3183] Wed, 22 February 2006 14:13 Go to previous messageGo to next message
Rodrigo Peretti is currently offline Rodrigo PerettiFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Philipp,

You're right. That code is old and we need to replace it to use the new
extensionActivity construct from BPEL. You can CC yourself to the
following bug if you want to track this change:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=119117

Thanks,
Rodrigo

philipp_tiedt@de.ibm.com wrote:
>
> Hi James,
>
> according to the OASIS issue 111 I suppose the pattern to introduce a
> new activity is to have an <extensionActivity> element including one
> <extensibilityElement> compared to the former approach of having an
> <invoke> element including one <extensibilityElement>.
>
> However the current editor code (I just extracted it one sec ago :-) )
> still focusses on the old (invoke) approach especially when checking for
> customactivities. In Detail I refer to the method
> BPELUtil.getEClassFor(Object target)
>
> public static EClass getEClassFor(Object target) {
> if (target instanceof Invoke) {
> ActionDescriptor[] descriptors =
> BPELUIRegistry.getInstance().getActionDescriptors();
> for (int i = 0; i < descriptors.length; i++) {
> AbstractBPELAction action = descriptors[i].getAction();
> if (action.isInstanceOf(target)) {
> return action.getModelType();
> }
> }
> }
> if (!(target instanceof EObject)) {
> return null;
> }
> return ((EObject)target).eClass();
> }
>
> and the method BPELUtil.isCustomActivity(Object target)
>
> public static boolean isCustomActivity(Object target) {
> if (target instanceof Invoke) {
> ActionDescriptor[] descriptors =
> BPELUIRegistry.getInstance().getActionDescriptors();
> for (int i = 0; i < descriptors.length; i++) {
> AbstractBPELAction action = descriptors[i].getAction();
> if (action.getModelType() ==
> BPELPackage.eINSTANCE.getInvoke()) continue;
> if (action.isInstanceOf(target)) {
> return true;
> }
> }
> }
> return false;
> }
>
> Is that old code that I have or is it used to be "backward compatible"
> or is it just not changed yet.
>
> At the moment I can not see how to provide an adapter for my
> customactivities (when included in extensionActivity elements). Well I
> can provide an AdapterFactory through my implementation of
> AbstractBPELAction. However, this factory is than associated with the
> EClass returned by my implementation ofgetModelType()
> (AbstractBPELAction). At this point this key-value pair is lost as due
> to the current getEClassFor(Object target) implementation (In case of
> ExtensionActivity it would just return that EClass but not ask the BPEL
> Action descriptors). The only way for me at the moment is to register a
> factory for ExtensionActivity but that makes no sense as extensibility
> would be gone :-).
>
> Am I missing sth ?
>
> Thx in advance
>
> Philipp
Re: Use of org.eclipse.bpel.common.model [message #3412 is a reply to message #3312] Mon, 27 February 2006 13:59 Go to previous messageGo to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 004CE021C1257122_=
Content-Type: text/plain; charset="US-ASCII"

Thx Rodrigo,

Pls. Let me know if you need any help. I would be more than happy to
contribute to this project.

Regards,
-philipp
--=_alternative 004CE021C1257122_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Thx Rodrigo,</font>
<br>
<br><font size=2 face="sans-serif">Pls. Let me know if you need any help.
I would be more than happy to contribute to this project.</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br><font size=2 face="sans-serif">-philipp</font>
--=_alternative 004CE021C1257122_=--
Re: Use of org.eclipse.bpel.common.model [message #3446 is a reply to message #3412] Mon, 27 February 2006 22:16 Go to previous message
Rodrigo Peretti is currently offline Rodrigo PerettiFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks Philipp. Using, commenting and opening bugs is already a great
help. Contributions of patches and code are also welcome. :) I'll let
you know if we need anything specific in this area.

Rodrigo

philipp_tiedt@de.ibm.com wrote:
>
> Thx Rodrigo,
>
> Pls. Let me know if you need any help. I would be more than happy to
> contribute to this project.
>
> Regards,
> -philipp
Previous Topic:Initial code release
Next Topic:BPEL Testing Framework
Goto Forum:
  


Current Time: Sat Nov 29 04:10:14 GMT 2014

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

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