New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E123 Exam - Topic 3 Question 23 Discussion

Actual exam question for Adobe's AD0-E123 exam
Question #: 23
Topic #: 3
[All AD0-E123 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: C

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.


Contribute your Thoughts:

0/2000 characters
Eleonora
3 months ago
Surprised there's no mention of error handling here!
upvoted 0 times
...
Craig
3 months ago
Wait, why is there a typo in the key names?
upvoted 0 times
...
Wayne
3 months ago
C seems a bit off, not sure about that one.
upvoted 0 times
...
Irma
4 months ago
I think A is the right choice!
upvoted 0 times
...
Valentine
4 months ago
Option B looks correct to me.
upvoted 0 times
...
Ira
4 months ago
I have a feeling that option C might be the right choice, but I need to double-check the method names.
upvoted 0 times
...
Tabetha
4 months ago
I'm a bit confused about the syntax in option A; it seems off, but I can't recall the exact reason why.
upvoted 0 times
...
Melina
4 months ago
I remember practicing a question similar to this, and I feel like the metadata should be accessed through the workflow object.
upvoted 0 times
...
Domonique
5 months ago
I think option B looks familiar, but I'm not entirely sure if the method chaining is correct.
upvoted 0 times
...
Alyce
5 months ago
This is a tricky one. I'm not entirely sure which code snippet is the right solution, as they all seem to involve working with the MetaDataMap in some way. I'll need to carefully consider the details of each option to make the best choice.
upvoted 0 times
...
Howard
5 months ago
I think I've got this one! Based on the information provided, option B looks like the correct way to save the metadata in the custom process step. I'll double-check the other options, but that's my initial assessment.
upvoted 0 times
...
Ashlyn
5 months ago
Okay, let's see here. The question is asking about saving metadata in a Java-based custom process step, so I'm guessing the answer has to do with interacting with the Workflow object and its MetaDataMap. I'll need to analyze the code snippets closely to determine the best approach.
upvoted 0 times
...
Dong
5 months ago
Hmm, I'm a bit unsure about this one. The question is asking for the specific code snippet to use, so I'll need to carefully read through the options and think about which one seems most appropriate.
upvoted 0 times
...
Ruby
5 months ago
This seems like a straightforward question about saving metadata in a custom workflow process. I think I've seen something like this before, so I'll try to apply that knowledge.
upvoted 0 times
...
Judy
1 year ago
Metadata, schmetadata. I'd rather write code that actually does something useful.
upvoted 0 times
...
Penney
1 year ago
Wow, this question is as clear as mud. I'm just going to guess and hope for the best.
upvoted 0 times
...
Hyun
1 year ago
A) looks a bit weird, who uses 'wfd' as a variable name? I'm sticking with B).
upvoted 0 times
Aleisha
1 year ago
C) I always try to use more descriptive variable names to make my code easier to read.
upvoted 0 times
...
Adela
1 year ago
B) Yeah, I think B) makes more sense and is easier to understand.
upvoted 0 times
...
Hayley
1 year ago
A) I agree, 'wfd' does seem like an odd choice for a variable name.
upvoted 0 times
...
...
Annabelle
1 year ago
I'd go with C) just to be safe. Accessing the workflow data directly might give you more flexibility down the line.
upvoted 0 times
Elbert
1 year ago
I'd go with C) just to be safe. Accessing the workflow data directly might give you more flexibility down the line.
upvoted 0 times
...
Felicitas
1 year ago
I agree with User1, A) seems like the right choice.
upvoted 0 times
...
Gianna
1 year ago
I think A) is the correct code snippet to save metadata.
upvoted 0 times
...
...
Alaine
1 year ago
B) seems like the most straightforward way to access the metadata map. No need to complicate things.
upvoted 0 times
Vinnie
1 year ago
Let's go with option B then.
upvoted 0 times
...
Linn
1 year ago
Yeah, no need to overcomplicate things.
upvoted 0 times
...
Marva
1 year ago
Agreed, it seems the most straightforward.
upvoted 0 times
...
Vashti
1 year ago
I think option B is the way to go.
upvoted 0 times
...
...
Tess
1 year ago
I'm not sure, but I think option C could also work based on the workflow structure.
upvoted 0 times
...
Herminia
1 year ago
I agree with Julio, option B seems to be the right choice.
upvoted 0 times
...
Julio
1 year ago
I think the correct code snippet is option B.
upvoted 0 times
...

Save Cancel