Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E123 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:

Judy
2 months ago
Metadata, schmetadata. I'd rather write code that actually does something useful.
upvoted 0 times
...
Penney
2 months ago
Wow, this question is as clear as mud. I'm just going to guess and hope for the best.
upvoted 0 times
...
Hyun
2 months ago
A) looks a bit weird, who uses 'wfd' as a variable name? I'm sticking with B).
upvoted 0 times
Aleisha
25 days ago
C) I always try to use more descriptive variable names to make my code easier to read.
upvoted 0 times
...
Adela
26 days ago
B) Yeah, I think B) makes more sense and is easier to understand.
upvoted 0 times
...
Hayley
1 months ago
A) I agree, 'wfd' does seem like an odd choice for a variable name.
upvoted 0 times
...
...
Annabelle
3 months 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 months 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
2 months ago
I agree with User1, A) seems like the right choice.
upvoted 0 times
...
Gianna
2 months ago
I think A) is the correct code snippet to save metadata.
upvoted 0 times
...
...
Alaine
3 months ago
B) seems like the most straightforward way to access the metadata map. No need to complicate things.
upvoted 0 times
Vinnie
2 months ago
Let's go with option B then.
upvoted 0 times
...
Linn
2 months ago
Yeah, no need to overcomplicate things.
upvoted 0 times
...
Marva
2 months ago
Agreed, it seems the most straightforward.
upvoted 0 times
...
Vashti
2 months ago
I think option B is the way to go.
upvoted 0 times
...
...
Tess
3 months ago
I'm not sure, but I think option C could also work based on the workflow structure.
upvoted 0 times
...
Herminia
3 months ago
I agree with Julio, option B seems to be the right choice.
upvoted 0 times
...
Julio
3 months ago
I think the correct code snippet is option B.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77