Getting extended properties

View: New views
7 Messages — Rating Filter:   Alert me  

Getting extended properties

by DS-22 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am fairly new to the Shark. After spending some time trying to figure out it myself, I have to admit I wasn't able to crack it.

If I define some extended properties, not related to Shark, what API should I use to access them? I need properties for roles and activities.

Thank you,

DS


--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Getting extended properties

by 20mithrandir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dmitry,

Dmitry Shulga wrote:
If I define some extended properties, not related to Shark, what API should
I use to access them? I need properties for roles and activities.
What exactly do you mean with 'API' for properties? I'd simply define them in one or another property file and read them when/where they're needed. Or you could always use the Shark database and enhance it with new tables if you don't like the configuration to be on the file system.

bye, Peter

Re: Getting extended properties

by Sasa Bojanic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

when you are talking about properties, I assume you mean XPDL's extended
attributes?

If so, to get extended attributes for the activity instance, you need to
do the following:

1. get the WMEntity object representing the definition of the particular
activity instance:

// AdminMisc am=...
// WMSessionHandle shandle=...

WMEntity ent=am.getActivityDefinitionInfo(shandle, procId, actId);

2. use utility method to get activitys' extended attribute name and values:

String[][] eas=WMEntityUtilities.getExtAttribNVPairs(shandle,
Shark.getInstance().getXPDLBrowser(), ent);


Greetings,
Sasa.

Dmitry Shulga wrote:

> Hello,
>
> I am fairly new to the Shark. After spending some time trying to
> figure out it myself, I have to admit I wasn't able to crack it.
>
> If I define some extended properties, not related to Shark, what API
> should I use to access them? I need properties for roles and activities.
>
> Thank you,
>
> DS


--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Parent Message unknown Re: Getting extended properties

by DS-22 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, that's it. Thank you Sasa. Sorry for the confusion with properties. I've submitted the question and only after that realized I misnamed them. But you got it right.

-DS

PS: Not sure how to properly reply to this mailing list.

---
Hi,

when you are talking about properties, I assume you mean XPDL's extended attributes? If so, to get extended attributes for the activity instance, you need to do the following: 1. get the WMEntity object representing the definition of the particular activity instance:
// AdminMisc am=...
// WMSessionHandle shandle=...

WMEntity ent=am.getActivityDefinitionInfo(shandle, procId, actId);

2. use utility method to get activitys' extended attribute name and values:

String[][] eas=WMEntityUtilities.getExtAttribNVPairs(shandle, Shark.getInstance().getXPDLBrowser(), ent);

Greetings,
Sasa.

Dmitry Shulga wrote:
Hello,

I am fairly new to the Shark. After spending some time trying to figure out it myself, I have to admit I wasn't able to crack it. If I define some extended properties, not related to Shark, what API should I use to access them? I need properties for roles and activities.
Thank you,

DS



--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Re: Getting extended properties

by DS-22 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


As I said in my previous post, thank you. I have a similar question about a
participant. Namely, I have defined my own AssignmentManager, which returns a
set of users based on some logic. In particular, I define a variable for each
process participant, which contains a user group name from our own system. In
the getAssignments method, I read a variable that corresponds to the
participantIdOrExpression and return it as a user group in the assignment
result list. Because this is typo-prone, I'd prefer to move this information
right into the participant definition, i.e. create an extended attribute. Now,
how can I access that extended attribute list using information I have in
getAssignments method?

Thank you,

Dmitry


--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Re: Re: Getting extended properties

by Sasa Bojanic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

you can look at WMEntityUtilities class, there are two methods that can
retrieve either all the participants from all the XPDLs uploaded into
Shark, or the participants for the given Package or WorkflowProcess entity.

Regards,
Sasa.

DS wrote:

> As I said in my previous post, thank you. I have a similar question about a
> participant. Namely, I have defined my own AssignmentManager, which returns a
> set of users based on some logic. In particular, I define a variable for each
> process participant, which contains a user group name from our own system. In
> the getAssignments method, I read a variable that corresponds to the
> participantIdOrExpression and return it as a user group in the assignment
> result list. Because this is typo-prone, I'd prefer to move this information
> right into the participant definition, i.e. create an extended attribute. Now,
> how can I access that extended attribute list using information I have in
> getAssignments method?
>
> Thank you,
>
> Dmitry
>  


--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Re: Re: Re: Getting extended properties

by DS-22 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Perfecto. Thank you very much, Sasa.

On a side note, I have hard time figuring out where things are coming from
because the documentation is rather vague. I understand that it is rather
difficult to maintain it though. Maybe a more extensive set of How to FAQ would
be great. It is just a bit difficult to find precious pieces of information
about Shark API in the Internet.


--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws