在 AEM 6.2 中向工作流收件箱添加 new/custom 属性
Add a new/custom property to workflow inbox in AEM 6.2
当用户在 [=12] 中启动工作流期间设置优先级 属性 时,我需要在经典 UI 收件箱中呈现新的优先级 属性 =].
我看到 AEM 6.3 but not in AEM 6.2 and the new Workitem 中的 OOTB 功能处理优先级。我了解在 AEM 6.3 中自定义收件箱的可能性。
如何利用 AEM 6.2 中的收件箱自定义?
我目前正在遵循 Adobe forum 中提到的方法。
即使更新了列列表,我也没有在收件箱中看到新列。
谢谢!!
您采用的方法适用于 CQ5。
对于 AEM 6.2,请按照以下步骤操作:
Taking a example to show the name of the workflow initiator
1) /libs/cq/workflow/content/notifications/workitemdetails/items/content/items/itemdetails/items/well/items
create a new node : nt:unstructured
(ex)
fieldLabel - String - Started By
name - String - startedBy
renderReadOnly - Boolean - true
showEmptyInReadOnly - Boolean - true
sling:resourceType - String - granite/ui/components/foundation/form/textfield
2) /libs/cq/workflow/components/inbox/list/json.jsp
add code :
WorkflowStatus wfStatus = res.adaptTo(WorkflowStatus.class);
if (wfStatus != null) {
List<Workflow> workflows = wfStatus.getWorkflows(true);
if(workflows.size() > 0) {
String initiator = workflows.get(0).getInitiator();
writer.key("startedBy").value(initiator);
}
}
Note :
key name (startedBy) should match the name defined in new node
3) /libs/cq/workflow/gui/components/inbox/clientlibs/inbox/js/model/InboxItemModel.js
toJSON: function() {
.
.
.
startedBy: Granite.I18n.getVar(this.get("startedBy")) || "",
}
Now you can see the custom node entry in /notifications.html]
screen shot :
https://i.stack.imgur.com/YpoY9.png
当用户在 [=12] 中启动工作流期间设置优先级 属性 时,我需要在经典 UI 收件箱中呈现新的优先级 属性 =].
我看到 AEM 6.3 but not in AEM 6.2 and the new Workitem 中的 OOTB 功能处理优先级。我了解在 AEM 6.3 中自定义收件箱的可能性。
如何利用 AEM 6.2 中的收件箱自定义?
我目前正在遵循 Adobe forum 中提到的方法。
即使更新了列列表,我也没有在收件箱中看到新列。
谢谢!!
您采用的方法适用于 CQ5。 对于 AEM 6.2,请按照以下步骤操作:
Taking a example to show the name of the workflow initiator
1) /libs/cq/workflow/content/notifications/workitemdetails/items/content/items/itemdetails/items/well/items
create a new node : nt:unstructured
(ex)
fieldLabel - String - Started By
name - String - startedBy
renderReadOnly - Boolean - true
showEmptyInReadOnly - Boolean - true
sling:resourceType - String - granite/ui/components/foundation/form/textfield
2) /libs/cq/workflow/components/inbox/list/json.jsp
add code :
WorkflowStatus wfStatus = res.adaptTo(WorkflowStatus.class);
if (wfStatus != null) {
List<Workflow> workflows = wfStatus.getWorkflows(true);
if(workflows.size() > 0) {
String initiator = workflows.get(0).getInitiator();
writer.key("startedBy").value(initiator);
}
}
Note :
key name (startedBy) should match the name defined in new node
3) /libs/cq/workflow/gui/components/inbox/clientlibs/inbox/js/model/InboxItemModel.js
toJSON: function() {
.
.
.
startedBy: Granite.I18n.getVar(this.get("startedBy")) || "",
}
Now you can see the custom node entry in /notifications.html]
screen shot :
https://i.stack.imgur.com/YpoY9.png