Fetch workflowStages assigned to any workflow step in AEM6.4 | Adobe Higher Education
Skip to main content
Level 2
November 14, 2018
Beantwortet

Fetch workflowStages assigned to any workflow step in AEM6.4

  • November 14, 2018
  • 2 Antworten
  • 1069 Ansichten

I' using AEM 6.4 where I've implemented the custom workflow step functionality as an OSGi Service and trying to determine which workflow step I'm currently based on the custom- 'Workflow Stages' created and assigned to each step. (refer screenshot below).

I'm able to see the correct workflow stages assigned to each workflow step in debug mode but I'm unable to fetch the actual string value from the JcrPropertyMap(i guess).

Below is the code which I believe I need to fix to get the correct property value-              

;-/

PropertyMap when copied from the debug mode contains expected workflowStage value.

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von arunpatidar

Hi,

Check your imports

import com.day.cq.workflow.metadata.MetaDataMap;

and try metadatamap2.get("KEY_WORKFLOW_STAGE", String.class);

2 Antworten

arunpatidar
Community Advisor
Community Advisor
November 14, 2018

Hi,

Check your imports

import com.day.cq.workflow.metadata.MetaDataMap;

and try metadatamap2.get("KEY_WORKFLOW_STAGE", String.class);

Arun Patidar
Level 2
November 14, 2018

Hi Arun,

Thanks for a quick response, yups that's correct..!

Solution : metadatamap2.get("KEY_WORKFLOW_STAGE", String.class);

I also found this same method from JcrValueMap class just sometime after posting this question, tried it & it worked.

Also, my import is - 'import com.adobe.granite.workflow.metadata.MetaDataMap;' and it works just fine.

FYI, I'm using AEM 6.4.

Regards,