I need to do that an user can choose between two options in a workflow, I was thinking in use a selection field in a dialog participant step. But I did some test...
I was trying to do it using dialog participant step. -> https://docs.adobe.com/docs/en/aem/6-3/develop/extending/workflows/step-ref.html#Dialog Participant Step
I’m trying to follow the adobe documentation example but is not working.
I did a dialog under /etc/workflow/dialogs
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Test"
sling:resourceType="cq/gui/components/authoring/dialog"
width="50rem"
height="30rem">
<content jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout jcr:primaryType="nt:unstructured"
margin="false"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
/>
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<title jcr:primaryType="nt:unstructured"
fieldLabel="Notification Email Address"
name="./jcr:content/watchEmails"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
/>
<title2 jcr:primaryType="nt:unstructured"
fieldLabel="Notification Email Address"
name="watchEmails"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
/>
</items>
</column>
</items>
</content>
</jcr:root>
We can see that I added two different textfields, to test both ways to store the info under jcr:content and in the workitem metadatas.
I use a custom process step after dialog participant step to debug if the info is stored.
I’m checking the working item and it hasn’t watchEmails property and also I’m checking that I haven’t this data under jcr:content (in this case a keyword hasn´t jrc:content but adobe says that if doesn´t exist will be created).
Also I checked the network in the browser console and I can see the post call to add this properties to the payload resource with a 200 OK, but never is stored.