Skip to main content

Hi


I have one client event in my activity with two destinations. A data field gets evaluated (via destination set rule) to specify to which destination the work item must go to. I have also added all the actions available for the client event.


Is there a way to let each destination only see specific actions out of all the actions on this client event?


Example:

There are 4 actions namely A, B, C, D


Destination 1 - can see actions A, B, C
and Destination 2 - can see actions A, B, D


Please assist


Thanks and regards

You can enforce this in the process if you're willing to write a little code...


Try the following:


- Configure your activity and client even as per normal (it sounds like this is already done)
- Right click on the desired activity and select 'View Code' then select 'Destination Rule'
    - You should then see the Windows WF schedule (XOML) for the destination rule
- Drag out a Windows Workflow 'Code'item from the VS toolbox and drop it below the 'Destination Rule' WF activity.
- Double click the new code acitvity and you should be taken to the stubbed out C# method
- you can then use something like the below to enforce who can see what actions:



            // Run through the destinations
            foreach (Destination dest in K2.Destinations)
            {
                // If the AllowedActions are left empty, all actions are available to that user.
                if (dest.Name == "Destination 1")
                {
                        dest.AllowedActions.Add("A");
                        dest.AllowedActions.Add("B");
                        dest.AllowedActions.Add("C");
                }
                else if (dest.Name == "Destination 2")
                {
                        dest.AllowedActions.Add("A");
                        dest.AllowedActions.Add("B");
                        dest.AllowedActions.Add("D");
                }


            }


HTH.


Hi Johan

You can also go to your Process under your Workflow server in K2 workspace and 'Deny' certain users to action specific actions.

Management Console-> Workflow Server-> Processes-> [yourprojectname]-> [yourprocessname]-> [activitynameeventname]

You will see the actions configured for the event is listed and from there you can add users to the specified action and 'Deny' him/her to take that action.

Cheers,


Hi


If one does deny the user permissions to an action from the workspace; can it only be done per user ?


I need to deny an action per group 


Regards


Reply