Action execution completes the process instead of just current activity

  • 20 December 2013
  • 1 reply
  • 0 views

Badge +3

Hi, 


I am new for K2 and just working on moving the first activity in workflow to the next. 


I used event wizard to configure actions till two corresponding outcomes and lines are generated. Of course, I linked outcome lines to the next activities before deployment. However, after I executed action in aspx code behind, the process instance is marked as process finished instead of moving to the next activity. 


Anybody knows why does that happen???!


 


Here is some of my code:


private void UpdateK2Data()
{
            if (chkCancelClientFile.Checked)
                DeclineWorklistItem(k2WorkItem);
            else
                ApproveWorklistItem(k2WorkItem);
}

public void ApproveWorklistItem(WorklistItem worklistitem)

{

        ActionWorklistItem(worklistitem, "Approve");

        CloseConnection();

}

public void ActionWorklistItem(WorklistItem worklistitem, string action)
{
    //Loop through all the actions this item has
    foreach (Action act in worklistitem.Actions.Cast<Action>().Where(act => act.Name == action))
    {
        act.Execute(false);
        break;
    }
}




                                
            
                        

1 reply

Badge +3

Like the last question, it is solved by myself. 


The rule adding under Outcome windown in "Outcome Succeeding Rule Property Wizard" is as condition of succeeding rule, NOT the outcome result that K2 will provide. I was confused. 


How about adding some tooltips when hover on buttons in future?? 

Reply