Manage Exception when scrip Groovy fail in Kaleo

thumbnail
Fernando Paz, modified 6 Years ago. New Member Posts: 11 Join Date: 9/16/16 Recent Posts
Hi people,

Please I need your guru Kaleo experience.  In some cases for both business errors and unexpected errors, the script writed for "task" or "join" nodes launchs exceptions.  The idea is that the article return to initial state (created) when that happens.

I tried putting code like 

try {

} catch (Exception e) {
   WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.toStatus("draft"), workflowContext);
}

But it doesn't work.

So what is your advice or best practice for those sceneries.

Thanks in advance