Hi Team,
How to read workflow name in custom process step in AEM.
PFA
I need to read the workflow name "summarvacation" value in the process step.
@asutosh_jena. @Ritesh_M @Arun_Patidar @Vijayalakshmi_S @Bhuwan_B
Solved! Go to Solution.
Views
Replies
Total Likes
Workflow title is part of metadata which you can get in your process step
e.g
final WorkflowData workflowData = workItem.getWorkflowData();
final MetaDataMap dataMap = workflowData.getMetaDataMap();
// now you can get workflowTitle from dataMap
Thanks
Dipti
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException { String title = workItem.getWorkflow().getWorkflowModel().getTitle() //Workflow Name }
Reference: https://stackoverflow.com/questions/37390424/how-to-get-metadata-in-aem-workflow
@Bhuwan_B
thanks
I already wrote the custom process step included process.label value also.
But that workflow name coming from when we start the workflow then we are giving that workflow name.
I am able to read the workflow model name but not the workflow name.
below code able to read workflow model title
String title = item.getWorkflow().getWorkflowModel().getTitle();
Can you please let me knowcan read workflow name?
Views
Replies
Total Likes
Views
Replies
Total Likes
@Bhuwan_B.
I am able to read the workflow model title but not the workflow name.
How can read read workflow name?
Views
Replies
Total Likes
@Bhuwan_B. I am able to read workflow model title but not rhe workflow name
Both are diffrent titles
Views
Replies
Total Likes
Workflow title is part of metadata which you can get in your process step
e.g
final WorkflowData workflowData = workItem.getWorkflowData();
final MetaDataMap dataMap = workflowData.getMetaDataMap();
// now you can get workflowTitle from dataMap
Thanks
Dipti
Views
Replies
Total Likes
Views
Likes
Replies