A developer has created a custom workflow model which includes a JAVA-based custom process step. During the creation of this custom process step, some data has been saved in metadata programmatically for subsequent workflow steps.
Which code snippet can be used to save this metadata in JAVA code7
When working with custom workflow steps in AEM, metadata associated with the workflow session can be programmatically accessed and manipulated. The MetaDataMap object serves as a container for this data. The correct way to access and modify this metadata in Java would be:
Option C, MetaDataMap wfd = WorkItem.getWorkflow().getWorkflowData().getMetaDataMap(); wfd.put('mykey', 'My Step Value'); This snippet correctly retrieves the MetaDataMap from the WorkflowData of the current Workflow session. It then uses the put method to store a new key-value pair, where 'mykey' is the key and 'My Step Value' is the value to be saved.
Options A and B do not properly chain the method calls to access the MetaDataMap associated with the current workflow session and are therefore incorrect.
Eleonora
10 months agoCraig
10 months agoWayne
10 months agoIrma
10 months agoValentine
10 months agoIra
11 months agoTabetha
11 months agoMelina
11 months agoDomonique
11 months agoAlyce
11 months agoHoward
11 months agoAshlyn
11 months agoDong
11 months agoRuby
11 months agoJudy
2 years agoPenney
2 years agoHyun
2 years agoAleisha
2 years agoAdela
2 years agoHayley
2 years agoAnnabelle
2 years agoElbert
2 years agoFelicitas
2 years agoGianna
2 years agoAlaine
2 years agoVinnie
2 years agoLinn
2 years agoMarva
2 years agoVashti
2 years agoTess
2 years agoHerminia
2 years agoJulio
2 years ago