|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Getting activity performerHello,
Is it possible to get a performer for a given activity? Namely, I have created a custom assignment manager that associates activity with a user group from our DB. In order to be flexible, each participant is augmented with an extended attribute with the name of the user group. So the assignment manager reads that attribute and add it to the assignment output list. The second thing that may happen is the reassignment. I'd like to be sure that that if an activity is reassigned, the user belongs to the group associated with the performer. And I am not exactly sure how to get the action performer so that I could read the extended attributes again. Thank you. -- 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 activity performerHi,
not sure if I understood correctly. Anyway, to get possible performers/assignees for the activity you can use: WfAssignment[] assignments=WfActivity.get_sequence_assignment(0); by calling WfAssignment.assignee() method you get WfResource object which represents the performer (WfResource.resource_key() is the performers' username). If you work with WAPI, you can also get the list of the assignemnts/workitems for the activity by calling WAPI.listWorkItems(...) and providing proper WMFilter object which you create through AssignmentFilterBuilder API by calling its addActivityIdEquals() method. If activity is accepted, you can also get the single performer of this activity by calling AdminMisc.getActivityResourceUsername(...) method. In the case you specify your group statically through extended attribute (e.g. you just write a string representing this group) I don't understand why are you using ExtendedAttribute for specifying group? Why don't you just create a participant with an Id the same as the value of your ext. attrib and put your activity inside this participant in JaWE (in XPDL specifying the activity's Performer field equal to this participant Id)? In this case, PerformerData structure which you get as a parameter in AssignmentManager's getAssignments() method has a field "participantIdOrExpression" equal to this Participant Id from XPDL. Also don't understand why do you put a group to the output list of an assignment manager? In this case activity will be assigned to the resource/user which has a username equal to this group. Regards, Sasa. DS wrote: > Hello, > > Is it possible to get a performer for a given activity? Namely, I have created > a custom assignment manager that associates activity with a user group from our > DB. In order to be flexible, each participant is augmented with an extended > attribute with the name of the user group. So the assignment manager reads that > attribute and add it to the assignment output list. The second thing that may > happen is the reassignment. I'd like to be sure that that if an activity is > reassigned, the user belongs to the group associated with the performer. And I > am not exactly sure how to get the action performer so that I could read the > extended attributes again. > > Thank you. > -- 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 activity performerSasa,
Sorry, I was probably not clear enough. I know how to get assignments for an activity (via a method call or using iterator). That's not what I need. I need to know the assigned performer, e.g. ROLE, for a given activity. You are actually completely right - I don't need the extended attribute, I just need to name my performers by name of the local user group. That's a great observation. Thank you. -- 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 activity performerSo you mean the Activity's performer from XPDL by the usage of Shark's
client API (in the assignment manager it is clear - you can get it from PerformerData structure as I explained)? There was a post on the mailing list how to find performer from XPDL: The participant reference is normally specified through XPDL Activity's Performer element. To get performer information having activity instance in the runtime, you can do the following: WMEntity ent = Shark.getInstance().getAdminMisc().getActivityDefinitionInfo(shandle, procId, actId); WMFilter filter = new WMFilter("Name", WMFilter.EQ, "Performer"); filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL); WMAttribute[] attrs = xpdlb.listAttributes(shandle, ent, filter, true).getArray(); String perf=null; if (attrs != null && attrs.length > 0) { perf = attrs[0].getValue().toString(); } return perf; Regards, Sasa. DS wrote: > Sasa, > > Sorry, I was probably not clear enough. I know how to get assignments for an > activity (via a method call or using iterator). That's not what I need. I need > to know the assigned performer, e.g. ROLE, for a given activity. > > You are actually completely right - I don't need the extended attribute, I just > need to name my performers by name of the local user group. That's a great > observation. > > Thank you. > -- 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 activity performerThat appears to be exactly what I need. Thanks! (not sure though what xpdlb
actually is) And I seem to have made a search for "performer" term and got nothing. -- 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: Re: Getting activity performersorry...xpdlb is XPDLBrowser interface instance. Using XPDL browser you
can get any detail of each XPDL loaded into Shark. DS wrote: > That appears to be exactly what I need. Thanks! (not sure though what xpdlb > actually is) And I seem to have made a search for "performer" term and got > nothing. > -- 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: Re: Getting activity performerNever mind - it is Shark.getInstance().getXPDLBrowser(). Thanks!
-- 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 |
| Free embeddable forum powered by Nabble | Forum Help |