Problem with action in K2BP

  • 24 October 2008
  • 2 replies
  • 0 views

Badge +6

Dear ,

 

I biult a very simple Workflow, with 4 activities, on one of the activities i have a decision to make. 

 

The problem is that on the Client even level i set 2 Action "Approve ", "Reject". 

 

The problem is that when i'm trying to access the actions from my application using the following code: 

 

                    objK2WorkflowConn.Open(setup);
                  
                    SourceCode.Workflow.Client.WorklistItem oWLItem = objK2WorkflowConn.OpenWorklistItem(strSN);
                    if (oWLItem != null)
                    {

                        foreach (Action act in oWLItem.Actions)
                        {
                            if (act.Name == ddlApproval.SelectedText)
                            {
                                act.Execute();
                                break;
                            }
                        }

                    }
                    else
                    {
                        throw( new Exception("AN Error has Occured"));
                    }

 

 

oWLItem.Actions.count = 0 

 

I added the actions using the wizzard in visual studio. 

 

What should i do in order to access the actions and execute them.

 

Thanks a lot 

2 replies

Badge +6

OK , I solved it.

In the Management Console i have to go through each action under the process Node, then add the Destination user and give him the "Allow" Rights.

 

Then everything will work fine.

 

Thanks  

Badge +11
Interesting...You should not have to set allow or deny on each activity/action.  If you don't set any restrictions on actions, then any assigned destination should have have rights to all actions.

Reply