如何在 AEM 中以编程方式启动工作流时提供自定义工作流标题

How to provide Custom workflow title while starting a workflow programmatically in AEM

当我使用以下方法从 servlet 启动工作流时,我正在尝试提供应该出现在 AEM Inbox 的 "Workflow" 列中的工作流标题 - workflowSession.startWorkflow(1,2, 3);

工作流中没有提供标题的字段API

当我从 http://localhost:4502/sites.html/content

下可用的创建选项启动工作流时,我可以提供工作流标题

workflowSession.startWorkflow(wfModel, wfData, metaDataMap);

我应该能够提供我自己的标题,该标题将显示在 http://localhost:4502/aem/inbox 的 "Workflow" 列下。

在 metaDataMap 中,您应该能够提供自定义标题。

final Map<String, Object> metaDataMap= new HashMap<>();
//This title will display in the workflow column of inbox items
metaDataMap.put("workflowTitle", "Custom Title for the workflow instance");