Custom if activity in workflow

sowmyaj
Giga Expert

Hi Everyone,

I have created if condition with custom activities based on multiple condition as shown below, the condition is true and log messages are captured but the return value is "no" instead of returning a string based on condition match and   which will not match with activity.result and failing the flow of workflow. Please let me know how to fix it.

find_real_file.png

one of the activities condition

find_real_file.png

Thanks,

Sowmya

1 ACCEPTED SOLUTION

Hi Sowmya,



I recently came across a similar situation, and as a workaround used   several redundant workflow.scratchpad in the if   else ladder, and later used a switch .The switch conditions for paths had the workflow scratchpad.



For eg.


in run script :


if(this ==this){


workflow.scratchpad.first='true';


}


else if(this== that){


workflow.scratchpad.first='true';


workflow.scratchpad.second='true';


}


else{


workflow.scratchpad.first='true';


workflow.scratchpad.second='true';


workflow.scratchpad.third='true';


}




in switch conditions,   for one path i used   workflow.scratchpad.first=='true';     similarly i used workflow.scratchpad.second='true'; in other and so on..


View solution in original post

7 REPLIES 7

Hi,



That basically was too generate several users tasks in my requirement,   But you can actually use single scratchpad within each if-else     ladder..



You would be adding conditions within the activity paths ( the conditions for task 1, task 2 etc in my example)find_real_file.png


Thanks a lot. It helped me to achieve my requirement.



Thanks,


Sowmya


Thank you so much Chuck Tomasi, Switch activity is working well for multiple choices.