Skip to main content
Nintex Community Menu Bar

Forcing goto if all lines evaluate to false

  • May 20, 2009
  • 2 replies
  • 5 views

Forum|alt.badge.img+5
Greetings.  I have a workflow with 16 Activities.  One of the Activities has 7 potential outcomes and I want to prevent the process from completing if none of the outcome lines evaluate to true.  If they all evaluate to false I essentially want to call a Goto event that forces the process to move to another specified Activity.  Any ideas?  Thanks.

2 replies

Forum|alt.badge.img+5
  • Author
  • May 20, 2009

To be a little more specific....  In a Server Event (Code) I can write the following: 


K2.GotoActivity("My Activity Name");


On the Activity I'm looking to implement this on, I can right-click the Activity and choose "View Code -> Succeeding Rule".   This brings up the following:


if (SucceedingRuleHelper.AnyOutcomesEvaluatedSuccessfully(K2))
{
     AllInfoPathTasksFinished(K2);
     K2.SucceedingRule = true;
}
else
{
     InfoPathTaskFinished(K2);
     K2.SucceedingRule = false;
     //Do something here
}


I'd like to drop some code at the "//Do something here" line above since this is the block of code that gets executed if none of my line rules evaluate to true.  However I don't have the same context of "K2" here and can't find the GotoActivity.  Any input is appreciated.  Thanks.


Forum|alt.badge.img+6
  • May 20, 2009

not sure to understand ;-).


Maybe this will be clearer with a little screenshot of your design.