Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » BPMN Modeler Annotations
BPMN Modeler Annotations [message #374599] Tue, 11 March 2008 09:19 Go to next message
Roland Gude is currently offline Roland Gude
Messages: 12
Registered: July 2009
Junior Member
Hi,

I am still struggeling with the customization of the BPMN Modeler.

I am trying to add information to the shapes (like adding a configurable
ip-address to a task)

I assumed that annotations are the way to go but unfortunately i was not
yet able to understand how i can add annotations to a shape.

If anyone could explain to me how that works, that would really be nice.
I have found the examples at
http://wiki.eclipse.org/STP/BPMN_Component/Samples#Annotatio n_Drag_and_Drop
But they do not make any sense to me.

kind regards,
roland
Re: BPMN Modeler Annotations [message #374600 is a reply to message #374599] Tue, 11 March 2008 09:31 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Roland, can you be a bit more specific regarding the sample you mention
? What does not make sense in particular ?

You can have a look at a somewhat similar sample I am realizing for
EclipseCon 2008.

http://wiki.eclipse.org/STP/BPMN_Component/EclipseCon2008#Th e_annotation_coding_sample

If you want to create your annotation with a different approach than
drag and drop, I would recommend that you check the participants sample,
where the annotation is edited and created through a properties tab.

Thanks,

Antoine

Roland Gude wrote:
> Hi,
>
> I am still struggeling with the customization of the BPMN Modeler.
>
> I am trying to add information to the shapes (like adding a configurable
> ip-address to a task)
>
> I assumed that annotations are the way to go but unfortunately i was not
> yet able to understand how i can add annotations to a shape.
>
> If anyone could explain to me how that works, that would really be nice.
> I have found the examples at
> http://wiki.eclipse.org/STP/BPMN_Component/Samples#Annotatio n_Drag_and_Drop
> But they do not make any sense to me.
>
> kind regards,
> roland
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #374603 is a reply to message #374600] Wed, 12 March 2008 05:21 Go to previous messageGo to next message
Roland Gude is currently offline Roland Gude
Messages: 12
Registered: July 2009
Junior Member
Hi,
my problem with the examples where that i did not really understand what
they are about and a lot of guess work on my side was involved. I figure
that i am missing some required knowledge to make sense of them.

Thanks for the pointer to the other examples, they are a lot more
accesible to me. Although i am not entirely sure i am on the right track
here.
Perhaps i should elaborate what i am trying to do.
In my use case, we have a repository of predifined processes from which
one can select those out of which a more complex workflow should be
composed.
The processes and its tasks are required to have certain identifiers which
may vary in complexity.
i.e. a task corresponds to some "realization" which is an existing program
wich is identifiable by its name, a version and a location, where location
may be omitted.

So what i want to do is:
have a task in the palette that allows these values to be populated with
predefined values.
i.e. you have a palette with to tasks, the first one will have the value
for "name" set to "someProg" and the "version" set to "X.Y.Z"
the other one will have "name" set to "somethingOtherProg" and so on...

i can put all these information in the name of the task, but i would have
to do a lot of string manipulation to get this robust. Is there a way to
store this information in annotations.
All those annotations are text values, some may be editable some may not.
It would be sufficient if those annotations that may be edible would be
edited over the properties view.

Any ideas how i could do that?
Re: BPMN Modeler Annotations [message #374604 is a reply to message #374603] Wed, 12 March 2008 08:03 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Hi Roland, see comments inline:

Roland Gude wrote:
> Hi,
> my problem with the examples where that i did not really understand what
> they are about and a lot of guess work on my side was involved. I figure
> that i am missing some required knowledge to make sense of them.
>
> Thanks for the pointer to the other examples, they are a lot more
> accesible to me. Although i am not entirely sure i am on the right track
> here.
> Perhaps i should elaborate what i am trying to do.
> In my use case, we have a repository of predifined processes from which
> one can select those out of which a more complex workflow should be
> composed.
> The processes and its tasks are required to have certain identifiers
> which may vary in complexity.
> i.e. a task corresponds to some "realization" which is an existing
> program wich is identifiable by its name, a version and a location,
> where location may be omitted.
>
> So what i want to do is:
> have a task in the palette that allows these values to be populated with
> predefined values.
> i.e. you have a palette with to tasks, the first one will have the value
> for "name" set to "someProg" and the "version" set to "X.Y.Z"
> the other one will have "name" set to "somethingOtherProg" and so on...
You will need to override the palette item, and change its tool
(CreationToolEx) to return a command to create the activity as well as
its annotation with the extra values.
>
> i can put all these information in the name of the task, but i would
> have to do a lot of string manipulation to get this robust. Is there a
> way to store this information in annotations.
> All those annotations are text values, some may be editable some may not.
> It would be sufficient if those annotations that may be edible would be
> edited over the properties view.
The participant view integrates a property tab that does just that. You
might want to look at it.
>
> Any ideas how i could do that?
>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #374605 is a reply to message #374604] Wed, 12 March 2008 10:07 Go to previous messageGo to next message
Eclipse User
Originally posted by: the_alien.heimlich-gut.de

Hi

I got a question about this participant example.
The property tab is always visible, what do I have to do, to make the
property tab only shows when a task is selected?

thx
Till
Antoine Toulme schrieb:
> Hi Roland, see comments inline:
>
> Roland Gude wrote:
>> Hi,
>> my problem with the examples where that i did not really understand
>> what they are about and a lot of guess work on my side was involved. I
>> figure that i am missing some required knowledge to make sense of them.
>>
>> Thanks for the pointer to the other examples, they are a lot more
>> accesible to me. Although i am not entirely sure i am on the right
>> track here.
>> Perhaps i should elaborate what i am trying to do.
>> In my use case, we have a repository of predifined processes from
>> which one can select those out of which a more complex workflow should
>> be composed.
>> The processes and its tasks are required to have certain identifiers
>> which may vary in complexity.
>> i.e. a task corresponds to some "realization" which is an existing
>> program wich is identifiable by its name, a version and a location,
>> where location may be omitted.
>>
>> So what i want to do is:
>> have a task in the palette that allows these values to be populated
>> with predefined values.
>> i.e. you have a palette with to tasks, the first one will have the
>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>> the other one will have "name" set to "somethingOtherProg" and so on...
> You will need to override the palette item, and change its tool
> (CreationToolEx) to return a command to create the activity as well as
> its annotation with the extra values.
>>
>> i can put all these information in the name of the task, but i would
>> have to do a lot of string manipulation to get this robust. Is there a
>> way to store this information in annotations.
>> All those annotations are text values, some may be editable some may not.
>> It would be sufficient if those annotations that may be edible would
>> be edited over the properties view.
> The participant view integrates a property tab that does just that. You
> might want to look at it.
>>
>> Any ideas how i could do that?
>>
>>
>>
>
>
Re: BPMN Modeler Annotations [message #374606 is a reply to message #374605] Wed, 12 March 2008 10:33 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

In the extension point
org.eclipse.ui.views.properties.tabbed.propertySections you can specify
the input for the property tab. For example you can refrain it to
Identifiable objects only.

If you want it only for tasks, just put Acivity instead.

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I got a question about this participant example.
> The property tab is always visible, what do I have to do, to make the
> property tab only shows when a task is selected?
>
> thx
> Till
> Antoine Toulme schrieb:
>> Hi Roland, see comments inline:
>>
>> Roland Gude wrote:
>>> Hi,
>>> my problem with the examples where that i did not really understand
>>> what they are about and a lot of guess work on my side was involved.
>>> I figure that i am missing some required knowledge to make sense of
>>> them.
>>>
>>> Thanks for the pointer to the other examples, they are a lot more
>>> accesible to me. Although i am not entirely sure i am on the right
>>> track here.
>>> Perhaps i should elaborate what i am trying to do.
>>> In my use case, we have a repository of predifined processes from
>>> which one can select those out of which a more complex workflow
>>> should be composed.
>>> The processes and its tasks are required to have certain identifiers
>>> which may vary in complexity.
>>> i.e. a task corresponds to some "realization" which is an existing
>>> program wich is identifiable by its name, a version and a location,
>>> where location may be omitted.
>>>
>>> So what i want to do is:
>>> have a task in the palette that allows these values to be populated
>>> with predefined values.
>>> i.e. you have a palette with to tasks, the first one will have the
>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>> the other one will have "name" set to "somethingOtherProg" and so on...
>> You will need to override the palette item, and change its tool
>> (CreationToolEx) to return a command to create the activity as well as
>> its annotation with the extra values.
>>>
>>> i can put all these information in the name of the task, but i would
>>> have to do a lot of string manipulation to get this robust. Is there
>>> a way to store this information in annotations.
>>> All those annotations are text values, some may be editable some may
>>> not.
>>> It would be sufficient if those annotations that may be edible would
>>> be edited over the properties view.
>> The participant view integrates a property tab that does just that.
>> You might want to look at it.
>>>
>>> Any ideas how i could do that?
>>>
>>>
>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #374607 is a reply to message #374606] Wed, 12 March 2008 12:14 Go to previous messageGo to next message
Eclipse User
Originally posted by: the_alien.heimlich-gut.de

I've set the input just to org.eclipse.stp.bmpn.Activity but the tab
won't show up at all, even the breakpoint in createControls of
ParticipantPropertySection is never reached.

What am I doing wrong?


Antoine Toulme schrieb:
> In the extension point
> org.eclipse.ui.views.properties.tabbed.propertySections you can specify
> the input for the property tab. For example you can refrain it to
> Identifiable objects only.
>
> If you want it only for tasks, just put Acivity instead.
>
> Thanks,
>
> Antoine
>
> Till Essers wrote:
>> Hi
>>
>> I got a question about this participant example.
>> The property tab is always visible, what do I have to do, to make the
>> property tab only shows when a task is selected?
>>
>> thx
>> Till
>> Antoine Toulme schrieb:
>>> Hi Roland, see comments inline:
>>>
>>> Roland Gude wrote:
>>>> Hi,
>>>> my problem with the examples where that i did not really understand
>>>> what they are about and a lot of guess work on my side was involved.
>>>> I figure that i am missing some required knowledge to make sense of
>>>> them.
>>>>
>>>> Thanks for the pointer to the other examples, they are a lot more
>>>> accesible to me. Although i am not entirely sure i am on the right
>>>> track here.
>>>> Perhaps i should elaborate what i am trying to do.
>>>> In my use case, we have a repository of predifined processes from
>>>> which one can select those out of which a more complex workflow
>>>> should be composed.
>>>> The processes and its tasks are required to have certain identifiers
>>>> which may vary in complexity.
>>>> i.e. a task corresponds to some "realization" which is an existing
>>>> program wich is identifiable by its name, a version and a location,
>>>> where location may be omitted.
>>>>
>>>> So what i want to do is:
>>>> have a task in the palette that allows these values to be populated
>>>> with predefined values.
>>>> i.e. you have a palette with to tasks, the first one will have the
>>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>>> the other one will have "name" set to "somethingOtherProg" and so on...
>>> You will need to override the palette item, and change its tool
>>> (CreationToolEx) to return a command to create the activity as well
>>> as its annotation with the extra values.
>>>>
>>>> i can put all these information in the name of the task, but i would
>>>> have to do a lot of string manipulation to get this robust. Is there
>>>> a way to store this information in annotations.
>>>> All those annotations are text values, some may be editable some may
>>>> not.
>>>> It would be sufficient if those annotations that may be edible would
>>>> be edited over the properties view.
>>> The participant view integrates a property tab that does just that.
>>> You might want to look at it.
>>>>
>>>> Any ideas how i could do that?
>>>>
>>>>
>>>>
>>>
>>>
>
>
Re: BPMN Modeler Annotations [message #374608 is a reply to message #374605] Wed, 12 March 2008 13:17 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Hey Till,

the input element might not work well, but I don't remember why at the
moment.

Can you try using a filter instead ? (in the same extension point, as an
attribute of the propertySection element).

Let us know how it goes, and please feel free to open a bug and give us
a patch over the participantView that would restrain the properties tab
to activities, it would certainly help a lot of people.

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I got a question about this participant example.
> The property tab is always visible, what do I have to do, to make the
> property tab only shows when a task is selected?
>
> thx
> Till
> Antoine Toulme schrieb:
>> Hi Roland, see comments inline:
>>
>> Roland Gude wrote:
>>> Hi,
>>> my problem with the examples where that i did not really understand
>>> what they are about and a lot of guess work on my side was involved.
>>> I figure that i am missing some required knowledge to make sense of
>>> them.
>>>
>>> Thanks for the pointer to the other examples, they are a lot more
>>> accesible to me. Although i am not entirely sure i am on the right
>>> track here.
>>> Perhaps i should elaborate what i am trying to do.
>>> In my use case, we have a repository of predifined processes from
>>> which one can select those out of which a more complex workflow
>>> should be composed.
>>> The processes and its tasks are required to have certain identifiers
>>> which may vary in complexity.
>>> i.e. a task corresponds to some "realization" which is an existing
>>> program wich is identifiable by its name, a version and a location,
>>> where location may be omitted.
>>>
>>> So what i want to do is:
>>> have a task in the palette that allows these values to be populated
>>> with predefined values.
>>> i.e. you have a palette with to tasks, the first one will have the
>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>> the other one will have "name" set to "somethingOtherProg" and so on...
>> You will need to override the palette item, and change its tool
>> (CreationToolEx) to return a command to create the activity as well as
>> its annotation with the extra values.
>>>
>>> i can put all these information in the name of the task, but i would
>>> have to do a lot of string manipulation to get this robust. Is there
>>> a way to store this information in annotations.
>>> All those annotations are text values, some may be editable some may
>>> not.
>>> It would be sufficient if those annotations that may be edible would
>>> be edited over the properties view.
>> The participant view integrates a property tab that does just that.
>> You might want to look at it.
>>>
>>> Any ideas how i could do that?
>>>
>>>
>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #374609 is a reply to message #374608] Wed, 12 March 2008 14:38 Go to previous messageGo to next message
Eclipse User
Originally posted by: the_alien.heimlich-gut.de

Hi

I wrote a class that implements IFilter. After casting through 3 classes
in the toTest Object, I can access the Activity and check the
ActivityType. Now it's working pretty well, but... is it a normal
behaviour, that my filter is called 3 times everytime something is selected?

Thanks,
Till

PS:
Maybe you want to add this lines to your tutorial:

package mypropertiesplugin.participant.properties;

import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.stp.bpmn.Activity;
import org.eclipse.stp.bpmn.ActivityType;
import org.eclipse.stp.bpmn.diagram.edit.parts.ActivityEditPart;

public class PropertySectionFilter implements IFilter {

@Override
public boolean select(Object toTest) {
// TODO Auto-generated method stub
if(toTest instanceof ActivityEditPart) {
ActivityEditPart act = (ActivityEditPart) toTest;
if(((NodeImpl)act.getModel()).getElement() instanceof Activity){
Activity task = (Activity)((NodeImpl)act.getModel()).getElement();
if(task.getActivityType() == ActivityType.get(ActivityType.TASK)) {
return true;
}
}
}
return false;
}

}

Antoine Toulme schrieb:
> Hey Till,
>
> the input element might not work well, but I don't remember why at the
> moment.
>
> Can you try using a filter instead ? (in the same extension point, as an
> attribute of the propertySection element).
>
> Let us know how it goes, and please feel free to open a bug and give us
> a patch over the participantView that would restrain the properties tab
> to activities, it would certainly help a lot of people.
>
> Thanks,
>
> Antoine
>
>
>
Re: BPMN Modeler Annotations [message #374610 is a reply to message #374609] Wed, 12 March 2008 14:47 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Till,

I don't know, this code is part of platform I think.

I need you to attach the code here as a patch to a bugzilla entry to be
able to accept it.

Also you can access the semantic element directly from the edit part
through this method:

((IGraphicalEditPart) part).resolveSemanticElement();

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I wrote a class that implements IFilter. After casting through 3 classes
> in the toTest Object, I can access the Activity and check the
> ActivityType. Now it's working pretty well, but... is it a normal
> behaviour, that my filter is called 3 times everytime something is
> selected?
>
> Thanks,
> Till
>
> PS:
> Maybe you want to add this lines to your tutorial:
>
> package mypropertiesplugin.participant.properties;
>
> import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
> import org.eclipse.jface.viewers.IFilter;
> import org.eclipse.stp.bpmn.Activity;
> import org.eclipse.stp.bpmn.ActivityType;
> import org.eclipse.stp.bpmn.diagram.edit.parts.ActivityEditPart;
>
> public class PropertySectionFilter implements IFilter {
>
> @Override
> public boolean select(Object toTest) {
> // TODO Auto-generated method stub
> if(toTest instanceof ActivityEditPart) {
> ActivityEditPart act = (ActivityEditPart) toTest;
> if(((NodeImpl)act.getModel()).getElement() instanceof
> Activity){
> Activity task =
> (Activity)((NodeImpl)act.getModel()).getElement();
> if(task.getActivityType() ==
> ActivityType.get(ActivityType.TASK)) {
> return true;
> }
> }
> }
> return false;
> }
>
> }
>
> Antoine Toulme schrieb:
>> Hey Till,
>>
>> the input element might not work well, but I don't remember why at the
>> moment.
>>
>> Can you try using a filter instead ? (in the same extension point, as
>> an attribute of the propertySection element).
>>
>> Let us know how it goes, and please feel free to open a bug and give
>> us a patch over the participantView that would restrain the properties
>> tab to activities, it would certainly help a lot of people.
>>
>> Thanks,
>>
>> Antoine
>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #374611 is a reply to message #374610] Wed, 12 March 2008 15:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: the_alien.heimlich-gut.de

A bugzilla entry to change the tutorial?
Sorry I don't get it. This is not a patch, just an enhancement for the
tutorial for people like me and Roland Gude ;)
Sorry, I'm new to the eclipse community...

Antoine Toulme schrieb:
> Till,
>
> I don't know, this code is part of platform I think.
>
> I need you to attach the code here as a patch to a bugzilla entry to be
> able to accept it.
>
> Also you can access the semantic element directly from the edit part
> through this method:
>
> ((IGraphicalEditPart) part).resolveSemanticElement();
>
> Thanks,
>
> Antoine
>

>
>
Re: BPMN Modeler Annotations [message #374612 is a reply to message #374611] Wed, 12 March 2008 15:20 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

The Eclipse Foundation is very careful of the IP of its projects, which
is normal.

We need to track everything that gets committed to the SVN, so that we
can establish that the IP is clean.

When creating a profile in Bugzilla, you accept that all patches are
donated to the Eclipse Foundation under the EPL.

Have a look at the diagram I made here:
http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn/trun k/samples/bpmn_samples/eclipse%20IP%20process/due%20diligenc e.jpg

Thanks,

Antoine

Till Essers wrote:
> A bugzilla entry to change the tutorial?
> Sorry I don't get it. This is not a patch, just an enhancement for the
> tutorial for people like me and Roland Gude ;)
> Sorry, I'm new to the eclipse community...
>
> Antoine Toulme schrieb:
>> Till,
>>
>> I don't know, this code is part of platform I think.
>>
>> I need you to attach the code here as a patch to a bugzilla entry to
>> be able to accept it.
>>
>> Also you can access the semantic element directly from the edit part
>> through this method:
>>
>> ((IGraphicalEditPart) part).resolveSemanticElement();
>>
>> Thanks,
>>
>> Antoine
>>
>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613278 is a reply to message #374599] Tue, 11 March 2008 09:31 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Roland, can you be a bit more specific regarding the sample you mention
? What does not make sense in particular ?

You can have a look at a somewhat similar sample I am realizing for
EclipseCon 2008.

http://wiki.eclipse.org/STP/BPMN_Component/EclipseCon2008#Th e_annotation_coding_sample

If you want to create your annotation with a different approach than
drag and drop, I would recommend that you check the participants sample,
where the annotation is edited and created through a properties tab.

Thanks,

Antoine

Roland Gude wrote:
> Hi,
>
> I am still struggeling with the customization of the BPMN Modeler.
>
> I am trying to add information to the shapes (like adding a configurable
> ip-address to a task)
>
> I assumed that annotations are the way to go but unfortunately i was not
> yet able to understand how i can add annotations to a shape.
>
> If anyone could explain to me how that works, that would really be nice.
> I have found the examples at
> http://wiki.eclipse.org/STP/BPMN_Component/Samples#Annotatio n_Drag_and_Drop
> But they do not make any sense to me.
>
> kind regards,
> roland
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613280 is a reply to message #374600] Wed, 12 March 2008 05:21 Go to previous message
Roland Gude is currently offline Roland Gude
Messages: 12
Registered: July 2009
Junior Member
Hi,
my problem with the examples where that i did not really understand what
they are about and a lot of guess work on my side was involved. I figure
that i am missing some required knowledge to make sense of them.

Thanks for the pointer to the other examples, they are a lot more
accesible to me. Although i am not entirely sure i am on the right track
here.
Perhaps i should elaborate what i am trying to do.
In my use case, we have a repository of predifined processes from which
one can select those out of which a more complex workflow should be
composed.
The processes and its tasks are required to have certain identifiers which
may vary in complexity.
i.e. a task corresponds to some "realization" which is an existing program
wich is identifiable by its name, a version and a location, where location
may be omitted.

So what i want to do is:
have a task in the palette that allows these values to be populated with
predefined values.
i.e. you have a palette with to tasks, the first one will have the value
for "name" set to "someProg" and the "version" set to "X.Y.Z"
the other one will have "name" set to "somethingOtherProg" and so on...

i can put all these information in the name of the task, but i would have
to do a lot of string manipulation to get this robust. Is there a way to
store this information in annotations.
All those annotations are text values, some may be editable some may not.
It would be sufficient if those annotations that may be edible would be
edited over the properties view.

Any ideas how i could do that?
Re: BPMN Modeler Annotations [message #613283 is a reply to message #374603] Wed, 12 March 2008 08:03 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Hi Roland, see comments inline:

Roland Gude wrote:
> Hi,
> my problem with the examples where that i did not really understand what
> they are about and a lot of guess work on my side was involved. I figure
> that i am missing some required knowledge to make sense of them.
>
> Thanks for the pointer to the other examples, they are a lot more
> accesible to me. Although i am not entirely sure i am on the right track
> here.
> Perhaps i should elaborate what i am trying to do.
> In my use case, we have a repository of predifined processes from which
> one can select those out of which a more complex workflow should be
> composed.
> The processes and its tasks are required to have certain identifiers
> which may vary in complexity.
> i.e. a task corresponds to some "realization" which is an existing
> program wich is identifiable by its name, a version and a location,
> where location may be omitted.
>
> So what i want to do is:
> have a task in the palette that allows these values to be populated with
> predefined values.
> i.e. you have a palette with to tasks, the first one will have the value
> for "name" set to "someProg" and the "version" set to "X.Y.Z"
> the other one will have "name" set to "somethingOtherProg" and so on...
You will need to override the palette item, and change its tool
(CreationToolEx) to return a command to create the activity as well as
its annotation with the extra values.
>
> i can put all these information in the name of the task, but i would
> have to do a lot of string manipulation to get this robust. Is there a
> way to store this information in annotations.
> All those annotations are text values, some may be editable some may not.
> It would be sufficient if those annotations that may be edible would be
> edited over the properties view.
The participant view integrates a property tab that does just that. You
might want to look at it.
>
> Any ideas how i could do that?
>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613286 is a reply to message #374604] Wed, 12 March 2008 10:07 Go to previous message
Till Essers is currently offline Till Essers
Messages: 92
Registered: July 2009
Member
Hi

I got a question about this participant example.
The property tab is always visible, what do I have to do, to make the
property tab only shows when a task is selected?

thx
Till
Antoine Toulme schrieb:
> Hi Roland, see comments inline:
>
> Roland Gude wrote:
>> Hi,
>> my problem with the examples where that i did not really understand
>> what they are about and a lot of guess work on my side was involved. I
>> figure that i am missing some required knowledge to make sense of them.
>>
>> Thanks for the pointer to the other examples, they are a lot more
>> accesible to me. Although i am not entirely sure i am on the right
>> track here.
>> Perhaps i should elaborate what i am trying to do.
>> In my use case, we have a repository of predifined processes from
>> which one can select those out of which a more complex workflow should
>> be composed.
>> The processes and its tasks are required to have certain identifiers
>> which may vary in complexity.
>> i.e. a task corresponds to some "realization" which is an existing
>> program wich is identifiable by its name, a version and a location,
>> where location may be omitted.
>>
>> So what i want to do is:
>> have a task in the palette that allows these values to be populated
>> with predefined values.
>> i.e. you have a palette with to tasks, the first one will have the
>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>> the other one will have "name" set to "somethingOtherProg" and so on...
> You will need to override the palette item, and change its tool
> (CreationToolEx) to return a command to create the activity as well as
> its annotation with the extra values.
>>
>> i can put all these information in the name of the task, but i would
>> have to do a lot of string manipulation to get this robust. Is there a
>> way to store this information in annotations.
>> All those annotations are text values, some may be editable some may not.
>> It would be sufficient if those annotations that may be edible would
>> be edited over the properties view.
> The participant view integrates a property tab that does just that. You
> might want to look at it.
>>
>> Any ideas how i could do that?
>>
>>
>>
>
>
Re: BPMN Modeler Annotations [message #613835 is a reply to message #374605] Wed, 12 March 2008 10:33 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

In the extension point
org.eclipse.ui.views.properties.tabbed.propertySections you can specify
the input for the property tab. For example you can refrain it to
Identifiable objects only.

If you want it only for tasks, just put Acivity instead.

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I got a question about this participant example.
> The property tab is always visible, what do I have to do, to make the
> property tab only shows when a task is selected?
>
> thx
> Till
> Antoine Toulme schrieb:
>> Hi Roland, see comments inline:
>>
>> Roland Gude wrote:
>>> Hi,
>>> my problem with the examples where that i did not really understand
>>> what they are about and a lot of guess work on my side was involved.
>>> I figure that i am missing some required knowledge to make sense of
>>> them.
>>>
>>> Thanks for the pointer to the other examples, they are a lot more
>>> accesible to me. Although i am not entirely sure i am on the right
>>> track here.
>>> Perhaps i should elaborate what i am trying to do.
>>> In my use case, we have a repository of predifined processes from
>>> which one can select those out of which a more complex workflow
>>> should be composed.
>>> The processes and its tasks are required to have certain identifiers
>>> which may vary in complexity.
>>> i.e. a task corresponds to some "realization" which is an existing
>>> program wich is identifiable by its name, a version and a location,
>>> where location may be omitted.
>>>
>>> So what i want to do is:
>>> have a task in the palette that allows these values to be populated
>>> with predefined values.
>>> i.e. you have a palette with to tasks, the first one will have the
>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>> the other one will have "name" set to "somethingOtherProg" and so on...
>> You will need to override the palette item, and change its tool
>> (CreationToolEx) to return a command to create the activity as well as
>> its annotation with the extra values.
>>>
>>> i can put all these information in the name of the task, but i would
>>> have to do a lot of string manipulation to get this robust. Is there
>>> a way to store this information in annotations.
>>> All those annotations are text values, some may be editable some may
>>> not.
>>> It would be sufficient if those annotations that may be edible would
>>> be edited over the properties view.
>> The participant view integrates a property tab that does just that.
>> You might want to look at it.
>>>
>>> Any ideas how i could do that?
>>>
>>>
>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613837 is a reply to message #374606] Wed, 12 March 2008 12:14 Go to previous message
Till Essers is currently offline Till Essers
Messages: 92
Registered: July 2009
Member
I've set the input just to org.eclipse.stp.bmpn.Activity but the tab
won't show up at all, even the breakpoint in createControls of
ParticipantPropertySection is never reached.

What am I doing wrong?


Antoine Toulme schrieb:
> In the extension point
> org.eclipse.ui.views.properties.tabbed.propertySections you can specify
> the input for the property tab. For example you can refrain it to
> Identifiable objects only.
>
> If you want it only for tasks, just put Acivity instead.
>
> Thanks,
>
> Antoine
>
> Till Essers wrote:
>> Hi
>>
>> I got a question about this participant example.
>> The property tab is always visible, what do I have to do, to make the
>> property tab only shows when a task is selected?
>>
>> thx
>> Till
>> Antoine Toulme schrieb:
>>> Hi Roland, see comments inline:
>>>
>>> Roland Gude wrote:
>>>> Hi,
>>>> my problem with the examples where that i did not really understand
>>>> what they are about and a lot of guess work on my side was involved.
>>>> I figure that i am missing some required knowledge to make sense of
>>>> them.
>>>>
>>>> Thanks for the pointer to the other examples, they are a lot more
>>>> accesible to me. Although i am not entirely sure i am on the right
>>>> track here.
>>>> Perhaps i should elaborate what i am trying to do.
>>>> In my use case, we have a repository of predifined processes from
>>>> which one can select those out of which a more complex workflow
>>>> should be composed.
>>>> The processes and its tasks are required to have certain identifiers
>>>> which may vary in complexity.
>>>> i.e. a task corresponds to some "realization" which is an existing
>>>> program wich is identifiable by its name, a version and a location,
>>>> where location may be omitted.
>>>>
>>>> So what i want to do is:
>>>> have a task in the palette that allows these values to be populated
>>>> with predefined values.
>>>> i.e. you have a palette with to tasks, the first one will have the
>>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>>> the other one will have "name" set to "somethingOtherProg" and so on...
>>> You will need to override the palette item, and change its tool
>>> (CreationToolEx) to return a command to create the activity as well
>>> as its annotation with the extra values.
>>>>
>>>> i can put all these information in the name of the task, but i would
>>>> have to do a lot of string manipulation to get this robust. Is there
>>>> a way to store this information in annotations.
>>>> All those annotations are text values, some may be editable some may
>>>> not.
>>>> It would be sufficient if those annotations that may be edible would
>>>> be edited over the properties view.
>>> The participant view integrates a property tab that does just that.
>>> You might want to look at it.
>>>>
>>>> Any ideas how i could do that?
>>>>
>>>>
>>>>
>>>
>>>
>
>
Re: BPMN Modeler Annotations [message #613839 is a reply to message #374605] Wed, 12 March 2008 13:17 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Hey Till,

the input element might not work well, but I don't remember why at the
moment.

Can you try using a filter instead ? (in the same extension point, as an
attribute of the propertySection element).

Let us know how it goes, and please feel free to open a bug and give us
a patch over the participantView that would restrain the properties tab
to activities, it would certainly help a lot of people.

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I got a question about this participant example.
> The property tab is always visible, what do I have to do, to make the
> property tab only shows when a task is selected?
>
> thx
> Till
> Antoine Toulme schrieb:
>> Hi Roland, see comments inline:
>>
>> Roland Gude wrote:
>>> Hi,
>>> my problem with the examples where that i did not really understand
>>> what they are about and a lot of guess work on my side was involved.
>>> I figure that i am missing some required knowledge to make sense of
>>> them.
>>>
>>> Thanks for the pointer to the other examples, they are a lot more
>>> accesible to me. Although i am not entirely sure i am on the right
>>> track here.
>>> Perhaps i should elaborate what i am trying to do.
>>> In my use case, we have a repository of predifined processes from
>>> which one can select those out of which a more complex workflow
>>> should be composed.
>>> The processes and its tasks are required to have certain identifiers
>>> which may vary in complexity.
>>> i.e. a task corresponds to some "realization" which is an existing
>>> program wich is identifiable by its name, a version and a location,
>>> where location may be omitted.
>>>
>>> So what i want to do is:
>>> have a task in the palette that allows these values to be populated
>>> with predefined values.
>>> i.e. you have a palette with to tasks, the first one will have the
>>> value for "name" set to "someProg" and the "version" set to "X.Y.Z"
>>> the other one will have "name" set to "somethingOtherProg" and so on...
>> You will need to override the palette item, and change its tool
>> (CreationToolEx) to return a command to create the activity as well as
>> its annotation with the extra values.
>>>
>>> i can put all these information in the name of the task, but i would
>>> have to do a lot of string manipulation to get this robust. Is there
>>> a way to store this information in annotations.
>>> All those annotations are text values, some may be editable some may
>>> not.
>>> It would be sufficient if those annotations that may be edible would
>>> be edited over the properties view.
>> The participant view integrates a property tab that does just that.
>> You might want to look at it.
>>>
>>> Any ideas how i could do that?
>>>
>>>
>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613841 is a reply to message #374608] Wed, 12 March 2008 14:38 Go to previous message
Till Essers is currently offline Till Essers
Messages: 92
Registered: July 2009
Member
Hi

I wrote a class that implements IFilter. After casting through 3 classes
in the toTest Object, I can access the Activity and check the
ActivityType. Now it's working pretty well, but... is it a normal
behaviour, that my filter is called 3 times everytime something is selected?

Thanks,
Till

PS:
Maybe you want to add this lines to your tutorial:

package mypropertiesplugin.participant.properties;

import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.stp.bpmn.Activity;
import org.eclipse.stp.bpmn.ActivityType;
import org.eclipse.stp.bpmn.diagram.edit.parts.ActivityEditPart;

public class PropertySectionFilter implements IFilter {

@Override
public boolean select(Object toTest) {
// TODO Auto-generated method stub
if(toTest instanceof ActivityEditPart) {
ActivityEditPart act = (ActivityEditPart) toTest;
if(((NodeImpl)act.getModel()).getElement() instanceof Activity){
Activity task = (Activity)((NodeImpl)act.getModel()).getElement();
if(task.getActivityType() == ActivityType.get(ActivityType.TASK)) {
return true;
}
}
}
return false;
}

}

Antoine Toulme schrieb:
> Hey Till,
>
> the input element might not work well, but I don't remember why at the
> moment.
>
> Can you try using a filter instead ? (in the same extension point, as an
> attribute of the propertySection element).
>
> Let us know how it goes, and please feel free to open a bug and give us
> a patch over the participantView that would restrain the properties tab
> to activities, it would certainly help a lot of people.
>
> Thanks,
>
> Antoine
>
>
>
Re: BPMN Modeler Annotations [message #613843 is a reply to message #374609] Wed, 12 March 2008 14:47 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Till,

I don't know, this code is part of platform I think.

I need you to attach the code here as a patch to a bugzilla entry to be
able to accept it.

Also you can access the semantic element directly from the edit part
through this method:

((IGraphicalEditPart) part).resolveSemanticElement();

Thanks,

Antoine

Till Essers wrote:
> Hi
>
> I wrote a class that implements IFilter. After casting through 3 classes
> in the toTest Object, I can access the Activity and check the
> ActivityType. Now it's working pretty well, but... is it a normal
> behaviour, that my filter is called 3 times everytime something is
> selected?
>
> Thanks,
> Till
>
> PS:
> Maybe you want to add this lines to your tutorial:
>
> package mypropertiesplugin.participant.properties;
>
> import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
> import org.eclipse.jface.viewers.IFilter;
> import org.eclipse.stp.bpmn.Activity;
> import org.eclipse.stp.bpmn.ActivityType;
> import org.eclipse.stp.bpmn.diagram.edit.parts.ActivityEditPart;
>
> public class PropertySectionFilter implements IFilter {
>
> @Override
> public boolean select(Object toTest) {
> // TODO Auto-generated method stub
> if(toTest instanceof ActivityEditPart) {
> ActivityEditPart act = (ActivityEditPart) toTest;
> if(((NodeImpl)act.getModel()).getElement() instanceof
> Activity){
> Activity task =
> (Activity)((NodeImpl)act.getModel()).getElement();
> if(task.getActivityType() ==
> ActivityType.get(ActivityType.TASK)) {
> return true;
> }
> }
> }
> return false;
> }
>
> }
>
> Antoine Toulme schrieb:
>> Hey Till,
>>
>> the input element might not work well, but I don't remember why at the
>> moment.
>>
>> Can you try using a filter instead ? (in the same extension point, as
>> an attribute of the propertySection element).
>>
>> Let us know how it goes, and please feel free to open a bug and give
>> us a patch over the participantView that would restrain the properties
>> tab to activities, it would certainly help a lot of people.
>>
>> Thanks,
>>
>> Antoine
>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: BPMN Modeler Annotations [message #613846 is a reply to message #374610] Wed, 12 March 2008 15:04 Go to previous message
Till Essers is currently offline Till Essers
Messages: 92
Registered: July 2009
Member
A bugzilla entry to change the tutorial?
Sorry I don't get it. This is not a patch, just an enhancement for the
tutorial for people like me and Roland Gude ;)
Sorry, I'm new to the eclipse community...

Antoine Toulme schrieb:
> Till,
>
> I don't know, this code is part of platform I think.
>
> I need you to attach the code here as a patch to a bugzilla entry to be
> able to accept it.
>
> Also you can access the semantic element directly from the edit part
> through this method:
>
> ((IGraphicalEditPart) part).resolveSemanticElement();
>
> Thanks,
>
> Antoine
>

>
>
Re: BPMN Modeler Annotations [message #613847 is a reply to message #374611] Wed, 12 March 2008 15:20 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

The Eclipse Foundation is very careful of the IP of its projects, which
is normal.

We need to track everything that gets committed to the SVN, so that we
can establish that the IP is clean.

When creating a profile in Bugzilla, you accept that all patches are
donated to the Eclipse Foundation under the EPL.

Have a look at the diagram I made here:
http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn/trun k/samples/bpmn_samples/eclipse%20IP%20process/due%20diligenc e.jpg

Thanks,

Antoine

Till Essers wrote:
> A bugzilla entry to change the tutorial?
> Sorry I don't get it. This is not a patch, just an enhancement for the
> tutorial for people like me and Roland Gude ;)
> Sorry, I'm new to the eclipse community...
>
> Antoine Toulme schrieb:
>> Till,
>>
>> I don't know, this code is part of platform I think.
>>
>> I need you to attach the code here as a patch to a bugzilla entry to
>> be able to accept it.
>>
>> Also you can access the semantic element directly from the edit part
>> through this method:
>>
>> ((IGraphicalEditPart) part).resolveSemanticElement();
>>
>> Thanks,
>>
>> Antoine
>>
>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Previous Topic:BPMN Modeler Annotations
Next Topic:Human Tasks
Goto Forum:
  


Current Time: Thu Apr 17 03:35:52 EDT 2014

Powered by FUDForum. Page generated in 0.04458 seconds