Switch case
/**
* Write your code here
* For example a random condition that returns 0, 1 or 2 and output them to a different output port
*/
return Math.round(Math.random() * 10) % 3;var fileName = NodeInputReader.inputAsFile().getName();
// which department to work with
if (fileName.contains("Accounting")) {
return 0; // Accounting output
} else if (fileName.contains("Human_Resources")) {
return 1; // Human Resources output
} else {
return 2; // Development output
}