Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

How to read workflow name in custom process step in AEM

Avatar

Level 2

Hi Team,

 

How to read workflow name in custom process step in AEM.

PFA

Screenshot 2021-06-26 at 6.45.26 PM.png

I need to read the workflow name "summarvacation" value in the process step.

@asutosh_jena. @Ritesh_M @Arun_Patidar @Vijayalakshmi_S  @Bhuwan_B

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @kotireddy4b1 

  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

View solution in original post

7 Replies

Avatar

Community Advisor
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {
    String title = workItem.getWorkflow().getWorkflowModel().getTitle() //Workflow Name
}

Referencehttps://stackoverflow.com/questions/37390424/how-to-get-metadata-in-aem-workflow

 

Avatar

Level 2

@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.

 

Screenshot 2021-06-28 at 2.03.05 PM.png

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?

 

Avatar

Level 2

@Bhuwan_B.

I am able to read the workflow model title but not the workflow name.

How can read read workflow name?
Screenshot 2021-06-26 at 6.45.26 PM.png

Avatar

Level 2

@Bhuwan_B. I am able to read workflow model title but not rhe workflow name
Both are diffrent titles

Avatar

Correct answer by
Community Advisor

Hi @kotireddy4b1 

  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