in kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/script/ErrorHandlingScript.java [33:48]
public static void init(KogitoProcessContext kcontext) {
LOG.debug("start");
// process instance variables
Set<Entry<String, Object>> entrySet = kcontext.getProcessInstance().getVariables().entrySet();
for (Entry<String, Object> entry : entrySet) {
LOG.debug("{} = {}\n", entry.getKey(), entry.getValue().toString());
}
ProcessWorkItemHandlerException exception = (ProcessWorkItemHandlerException) kcontext.getVariable("Error");
// get strategy
if (exception != null) {
String strategy = exception.getStrategy().name();
kcontext.setVariable("strategy", strategy);
}
LOG.debug("end");
}