Understanding how OR Split in workflow works
I am having some troubles understanding how the OR split works.
I have a workflow model that is supposed to do the following:
1. Check if page is valid
2. If yes
2a. Deactive page
2b. Move and Archive page, more like a soft delete of content
2c. Notification email
3. If No
3a. Notification email
In Step 1, I set the following key/value pair:
item.getWorkflowData().getMetaDataMap().put("IsValid", String.valueOf(isValidContent));
In the OR condition, I have this in the ecma script for Batch 1:
function check() {
var isValidContent = graniteWorkItem.getWorkflowData().getMetaDataMap().get("IsValid");
log.info("isValidContent = "+isValidContent);
if (isValidContent === "true"){
return true;
}else{
return false;
}
}
What does this mean? Branch 1 will be triggered when check() returns true and Branch 2 for all false? What should the check() condition in Branch 2 return? I am a bit lost and need some help on this to understand how the split works.
Thanks,
Anand
