How to read workflow name in custom process step in AEM

Avatar

Avatar
Validate 1
Level 1
kotireddy4b1
Level 1

Likes

0 likes

Total Posts

15 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
kotireddy4b1
Level 1

Likes

0 likes

Total Posts

15 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
kotireddy4b1
Level 1

28-06-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

114 likes

Total Posts

136 posts

Correct reply

40 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

114 likes

Total Posts

136 posts

Correct reply

40 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile
Dipti_Chauhan
Level 6

28-06-2021

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

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 6
Bhuwan_B
Level 6

Likes

133 likes

Total Posts

125 posts

Correct reply

50 solutions
Top badges earned
Validate 1
Affirm 50
Give Back 5
Boost 100
Give Back 3
View profile

Avatar
Validate 1
Level 6
Bhuwan_B
Level 6

Likes

133 likes

Total Posts

125 posts

Correct reply

50 solutions
Top badges earned
Validate 1
Affirm 50
Give Back 5
Boost 100
Give Back 3
View profile
Bhuwan_B
Level 6

28-06-2021

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