[jboss-user] [jBPM] - Re: Trying to set ActorId in On Entry Action - work item is null

jemmerling do-not-reply at jboss.com
Thu Jan 26 16:49:52 EST 2012

jemmerling [https://community.jboss.org/people/jemmerling] created the discussion

"Re: Trying to set ActorId in On Entry Action - work item is null"

To view the discussion, visit: https://community.jboss.org/message/648956#648956

So when trying your suggestions:

I tried using a process variable to specify GroupId for a task. I would like to ask whether you have done this successfully; if so, I will try harder! At present it seems to fail. Note this is jBPM 5.2.

So the name of the group to which I want to associate this task is "managers". I had specified GroupId as "managers" (without quotes) in the task definition and this worked as expected.

I tried using a process variable to specify ActorId. This also clearly worked. Also I believe I found some JUnit test in the source distribution that exercises this.

So I changed the GroupId specification to "#{managersGroup}" plus I defined a process variable with this name.

To assign a value to this variable, I created a Script Node (that executes right after the process is instantiated) that assigns the value:

System.out.println("** ** ** ** ** managers: " + managersGroup + " ** ** ** ** ** ** **"); 
managersGroup = "managers";
"** ** ** ** ** managers: " + managersGroup + " ** ** ** ** ** ** **" );

I see the messages written to stdout that indicate the variable has this value assigned.

However, when a member of the managers group looks at their task list, it is empty. Setting a breakpoint, I see that when this method in TaskServiceSession is called:

**public** List<TaskSummary> getTasksAssignedAsPotentialOwner(**final**String userId, List<String> groupIds, **final** String language, **final** **int** firstResult, **int** maxResults)

groupIds is an empty list (or null, now I forget which).

So please just let me know if you have ever gotten this to work. If you have an example, please show how you specified GroupId.



Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120126/290f2e2b/attachment-0001.html 

More information about the jboss-user mailing list