> I have 3 users associated with corresponding user groups as mentioned below,
> 
> editor -> editors(group)
> sreditor -> senioreditors(group)
> publisher -> publishers(group)
> 
> Activation flow works fine for user flow
> editor->sreditor->publisher.
> 
> But the problem is who ever activates the work item moves to sreditor inbox.
> 
> <process-definition name="activation" revision="j0.0.2">
>  <sequence>
>    <set field="activator" field-value="userName"/>
> 
>    [b]<!--  go to senioreditors first -->
>    <to-senioreditors/>[/b]

Workflow does exactly what you told it to. What you actually want is  add some 
if/else tests to check if user who initiated workflow is in given group to 
dispatch item to that user.

Sicne workflow can't ask this information from the system you have to either 
inject it in the context at the beginning (by using custom tree handler if you 
initiate workflow from tree) or (which might be easier for you) write special 
command that will just read user name from execution context, get the user 
object  (SecuritySupport.getUserManager().getUser(username)  ) and then check 
if user is in group (user.inGroup(groupName)  ) and set appropriate boolean 
prop in the context for all three groups you are checking for. Once you put 
them in the context, workflow will be able to access those values and react as 
appropriate.

HTH,
Jan



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to