cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Checkbox to be selected based on routing option

AK_10813265
7-Bedrock

Checkbox to be selected based on routing option

I have created the variable and check box is appearing as expected in the task page. there is this requirement where

there are 2 routing options, out of which for "Completed" routing option once selected  it should not complete the task  after clicking "Complete task" button until and unless the check box is selected. but where as the "Return_to_project_owner" routing option once selected even if the check box is not selected it should be allowed to complete the task.

 

AK_10813265_0-1717670280608.png

 

till now I have this code in handy , which will not allow until the check box is selected but i wanted with routing option condition

public static Object[] criticalitytraceabilitycheck(Object result, boolean Criticalitycheck) throws Exception {
System.out.println("Enter WFT_PolEntChangeActivity.criticalitycheck --> ");


if (Criticalitycheck == false){

result = false;
String msg = "To complete the task, Please select check box";
java.lang.Exception exp = new java.lang.Exception(msg);
throw exp;
}
else {
result = true;
}
Object[] wfAutoExternResult = {result};
return wfAutoExternResult;
}

 

can anyone please help me on this for the code?

2 REPLIES 2

I think you’re overthinking this.

 

All you need to do is put the code in the Complete transition and the code can be as simple as this.

 

if (!Criticalitycheck){
throw new Exception("To complete the task, Please select check box.");
}

Hello @AK_10813265

 

It looks like you have a response from a community member. If it helped you solve your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Top Tags