Adobe AEM 6.4.x 工作流程:在 OR 拆分中使用时未定义 graniteWorkItem

Adobe AEM 6.4.x workflows: graniteWorkItem is undefined when used in an OR split

我正在尝试 运行 OR 拆分中的脚本,但我不断收到以下错误。根据此 page,"graniteWorkItem" 包含在 "variables that are immediately available to process scripts, providing access to objects of the workflow Java API" 的列表中(引用自 link)。

观察:

知道我做错了什么吗?


或拆分脚本(有错误。见下文)

function check() {  
    var workflowData = graniteWorkItem.getWorkflowData();
     return false;  
}

动态参与者脚本(error.log 中的 g运行iteWorkItem 没有错误)

function getParticipant() {
    return graniteWorkItem.getWorkflow().getInitiator();
}

来自 error.log

的错误
> tail -f error.log | grep -i "graniteWorkItem"
    var workflowData = graniteWorkItem.getWorkflowData();
} : Failure running script /libs/workflow/scripts/dynamic.ecma: ReferenceError: "graniteWorkItem" is not defined. (NO_SCRIPT_NAME#2)
org.apache.sling.api.scripting.ScriptEvaluationException: Failure running script /libs/workflow/scripts/dynamic.ecma: ReferenceError: "graniteWorkItem" is not defined. (NO_SCRIPT_NAME#2)
Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "graniteWorkItem" is not defined. (NO_SCRIPT_NAME#2)
    var workflowData = graniteWorkItem.getWorkflowData();
com.adobe.granite.workflow.WorkflowException: org.apache.sling.api.scripting.ScriptEvaluationException: Failure running script /libs/workflow/scripts/dynamic.ecma: ReferenceError: "graniteWorkItem" is not defined. (NO_SCRIPT_NAME#2)
Caused by: org.apache.sling.api.scripting.ScriptEvaluationException: Failure running script /libs/workflow/scripts/dynamic.ecma: ReferenceError: "graniteWorkItem" is not defined. (NO_SCRIPT_NAME#2)

我不是 100% 确定,但 check() 方法中的 workflowData 是否不可用 - 无需从工作项中获取它?