All outcome action are executed

  • 10 November 2010
  • 0 replies
  • 0 views

Badge

Dear all,


I have created a workflow using K2 Studio.

At one default activity, I put a default client event with three (3) outcomes that is Route, Complete, and Cancel.

I trigger the worklist item action from web page using c# asp.net.

using SourceCode.Workflow.Client;

/*line to get k2 server, k2 process, and k2 conn here */
string strCmd = "edit"/*trigger on client action in the asp.net page */
string serialNumber = "50_50"; /*example of valid serial number */
SourceCode.Workflow.Client.WorklistItem receiveItem = receiveConn.OpenWorklistItem(serialNumber, "ASP", true, false);
if (strCmd == "edit") {
foreach (SourceCode.Workflow.Client.Action myAction in receiveItem.Actions)
if (myAction.Name.ToLower()=="route"){
myAction.Execute();/*only route should be executed. */
}
}

The problem is, Route is executed, but other action also executed. If I see the flow, the three activity all areĀ green.

It should be only Route that is green and others are red.

Please, give me your valuable input and advice!

Thanks and regards,
Suprayogi


0 replies

Be the first to reply!

Reply