RE: Getting a WfResource for a Group

"Dahl, Greg (BLM) - contr" <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <A8155E0D38B9D84D88EAC58C2D8F47BA05D7E926@blmms060.accounts.root.corp>
As a follow-up:

My first set of code doesn't actually work quite right.  It will only
work if the user (in this case "UserInGroupOne") has been assigned work.
The ExecutionAdministration.getResource() method only gets a _Resource_,
NOT a _User_.  Thus, it will not be able to assign work to someone who
never has had work assigned to them.

This leads me to believe I'm doing this all wrong.  

I tried using the ArbitraryExpression swimlane and the
XPDLStraightParticipantAssignmentManager.  Once the WRD was set, that
would assign the work to a resource named whatever was in the WRD, but
when the server went to reevaluateAssignments, it always threw a
"expression can not be evaluated" on these assignments because it
appeared to create a new resource entry but that entry was not linked to
the user or group in anyway.

I can't believe I would be the only person that wants to assign an
activity to a group of people.

If anyone has any hints, I'm desperate for clues.

Greg


> -----Original Message-----
> From: Dahl, Greg (BLM) - contr 
> Sent: Wednesday, July 20, 2005 8:46 AM
> To: [email protected]
> Subject: [shark] Getting a WfResource for a Group
> 
> 
> The following code works fine if I want to assign an activity 
> to an individual user:
> 
>             	//set the assignment.
>             	WfAssignmentIterator wfai = 
> currentActivity.get_iterator_assignment();
>             	WfAssignment assignment = wfai.get_next_object();
>             	WfResource currentResource 	= assignment.assignee();
>             	System.out.println("This activity is currently 
> assigned to " + currentResource.resource_name());
>             	WfResource newResource 	=
> sharkExecutionAdministration.getResource("UserInGroupOne");
>             	assignment.set_assignee(newResource);
> 
> But, if I try using similar code to try to get a group:
> 
>             	WfResource newResource 	=
> sharkExecutionAdministration.getResource("GroupOne");
> 
> The resource is null.
> 
> I would like to be able to assign groups dynamically but 
> without getting a reference to the group, I can't figure out 
> how to do so.
> 
> Any ideas or is there a different API call I should be using?
> 
> Thanks,
> Greg
> ******* Confidentiality Notice *******
> This email, its electronic document attachments, and the 
> contents of its website linkages may contain confidential 
> health information.  This information is intended solely for 
> use by the individual or entity to whom it is addressed.  If 
> you have received this information in error, please notify 
> the sender immediately and arrange for the prompt destruction 
> of the material and any accompanying attachments.
> 
> 
> 
> 
>
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.