E9.2 Fail orchestration if rule false

jvalentine

Member
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)
 
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;
}
 
Back
Top