I'm developing a workflow which involves OR split. It has three branches, first two contain following script:
function check() { if (workflowData.getPayloadType() == "JCR_PATH") { var path = workflowData.getPayload().toString(); var node = jcrSession.getItem(path); if (node.getPath().indexOf("/fr/") >= 0) { log.info('French content'); return true; } else { return false; } } else { return false; } }
Lines 5 & 6 are different for the first and second branches - I'm detecting which branch specific content belongs to. Third branch is marked as default route - fallback for the non english or spanish content.
When I'm running the workflow default route is always being used, regardless of the evaluation results of first two branches of the split. In error log I can see that "french" branch was evaluated successfully but system using default branch anyway.
Any ideas?