workflow metadata args in process step | Community
Skip to main content
rgravisankar
Level 2
September 24, 2021
Solved

workflow metadata args in process step

  • September 24, 2021
  • 2 replies
  • 2247 views

Hi All,

I had created a workflow with one process step and provided some arguments. While I was trying to retrieve the Metadata args, I was getting only PROCESS key and its value, not PROCESS_ARGS key and value. But I can see the value on crx workflow model. Below the code snippet I use,

String processArgs = args.get("PROCESS_ARGS", String.class); Thanks in advance for your help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

@rgravisankar you should use Sync option in Touch UI interface - this will apply changes under /var as well. Please be aware that once you are running new instance of the workflow model from /var will be used. So I suggest to update model definition under /var and see if this will help.

 

You can also have a look into documentation https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-workflows/workflows-models.html?lang=en#sync-your-workflow-generate-a-runtime-model

2 replies

ArpitVarshney
Community Advisor
Community Advisor
September 24, 2021

Hi @rgravisankar 

 

Can you try below code snippet:

String processArgs = processArguments.get("PROCESS_ARGS", "string").toString();

 

Regards,

Arpit Varshney

rgravisankar
Level 2
September 24, 2021

Hi @arpitvarshney,I understand processAruguments is instance of MateDataMap from execute method parameter, if so, there no PROCESS_ARGS key present.

Iterator<String> ite = args.keySet().iterator(); while(ite.hasNext()) { print(ite.next()); }

above code prints only "PROCESS", not "PROCESS_ARGS". Thanks.

 

Regards,

Ravi R

lukasz-m
Community Advisor
Community Advisor
September 24, 2021

Hi @rgravisankar could you please check if both workflow models - under /conf and /var contains PROCESS_ARGS property?

rgravisankar
Level 2
September 24, 2021

@lukasz-m I can see PROCESS_ARGS property under /conf, but not in /var. Did miss anything when I create workflow model?

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
September 24, 2021

@rgravisankar you should use Sync option in Touch UI interface - this will apply changes under /var as well. Please be aware that once you are running new instance of the workflow model from /var will be used. So I suggest to update model definition under /var and see if this will help.

 

You can also have a look into documentation https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-workflows/workflows-models.html?lang=en#sync-your-workflow-generate-a-runtime-model