【问题标题】:Add a new/custom property to workflow inbox in AEM 6.2在 AEM 6.2 中向工作流收件箱添加新/自定义属性
【发布时间】:2017-11-07 14:33:40
【问题描述】:

当用户在AEM 6.2 中的工作流启动期间设置优先级属性时,我需要在经典 UI 收件箱中呈现新的优先级属性。

我在 AEM 6.3 中看到这是一个 OOTB 功能,但在 AEM 6.2 中没有,新的 Workitem 处理优先级。我了解在 AEM 6.3 中自定义收件箱的可能性。

如何利用 AEM 6.2 中的收件箱自定义?

我目前正在遵循Adobe forum 中提到的方法。

即使在更新列列表后,我也没有在收件箱中看到新列。

谢谢!!

【问题讨论】:

    标签: java adobe aem


    【解决方案1】:

    您遵循的方法适用于 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-12
      • 2012-04-13
      • 1970-01-01
      • 1970-01-01
      • 2015-03-09
      • 2018-08-06
      • 1970-01-01
      相关资源
      最近更新 更多