jvalentine Member Jul 27, 2023 #1 Looking to see if can make an orchestration fail to status Error (500) if a rule in orchestration returns false. Currently returns status Success (200)
Looking to see if can make an orchestration fail to status Error (500) if a rule in orchestration returns false. Currently returns status Success (200)
DaveWagoner VIP Member Jul 27, 2023 #2 Yup! Groovy script with throw exception on the false path. Map your "hard coded" error message in as input to this component. JavaScript: import com.oracle.e1.common.OrchestrationAttributes; HashMap<String, Object> main(OrchestrationAttributes orchAttr, HashMap inputMap) { HashMap<String, Object> returnMap = new HashMap<String, Object>(); def exceptionMessage = (String)inputMap.get("exceptionMessage"); throw new Exception(exceptionMessage); return returnMap; }
Yup! Groovy script with throw exception on the false path. Map your "hard coded" error message in as input to this component. JavaScript: import com.oracle.e1.common.OrchestrationAttributes; HashMap<String, Object> main(OrchestrationAttributes orchAttr, HashMap inputMap) { HashMap<String, Object> returnMap = new HashMap<String, Object>(); def exceptionMessage = (String)inputMap.get("exceptionMessage"); throw new Exception(exceptionMessage); return returnMap; }