Issue with AEM OR Split Step



I am trying to use the OR Split Step in AEM 6.4 workflow.

Before the OR Split Step I have a Process step that is setting a property "isApprover" in WF data the via sample code :

WorkflowData data = workItem.getWorkflow().getWorkflowData();

data.getMetaDataMap().put("isApprover", true);

Now in the OR Step I have two branches with the following config:

Branch 1 - ECMA Code:

function check(){

    var status = workflowData.getMetaDataMap().get("isApprover").toString();

    log.info("Approver check ECMA Script status is: " + (status=="true"));


  return true;



        return false;



Branch 2 : Marked as Default

Now the issue is that the workflow always goes into the branch marked as "default" and never goes into the branch 1 even when the check() function is returning true.

Please help in resolving this issue.