Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adaptive Form Data in Custom Task Notification Email

Avatar

Level 2

I am creating an adaptive form for submission to a WorkBench process.

I am using custom email templates in the Assign Task steps of the process.

I am using Xpath to include form data in the custom emails.

When the non-adaptive form is submitted via WorkSpace, the custom email is received as expected.

When the adaptive form is submitted via a web portal, only system data is included (process id, task id, create time), but

other Xpath data is blank.

The process recording shows the adaptive form's xml data is contained in the xml variable.

Considering this, can anyone explain why the Xpath data is blank in the custom email when my adaptive form is submitted?

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Add a Set Value step immediately after the Workbench process start point.

Add a second XML variable to the Workbench process.

Name the second XML variable exactly the same as what's listed in Configuration Manager's Guide LC Process Locator and Invoker (http://localhost:4502/system/console/configMgr)

Edit the Set Value xpath mapping:

Location -  /process_data/NameOfFirstXmlVariable

Expression -  /process_data/dataxml/afData/afBoundData/xdp/datasets/data/FirstXmlVariableRootElement

(the Expression has to be manually typed; it cannot be selected from the editing window.)

View solution in original post

4 Replies

Avatar

Employee Advisor

Check Xpath mapping in case of XML received through Adaptive Form submission. It has data elements corresponding to bounded/unbounded fields.[1]

Thanks

Wasil

[1] AEM 6.0 Forms Help | Introduction to prepopulating adaptive form fields

Avatar

Level 2

In Designer, I created an XML file for the non-adaptive form.

I then used that XML file to create an XSD file.

I then created a Workbench XML variable and imported the non-adaptive form's XSD into it.

It seems that I need to be able to create an XSD file from the adaptive form's XML.

Then I would need to create a Workbench XML variable and import the adaptive form's XSD into it.

How can I do this?

Thank you.

Avatar

Employee Advisor

If you have  data XML for AF you can create corresponding XSD.

For getting XML lets use "Store content action submit action[1].

Once you submit Adaptive Form, data XML could be located in http://<host>:<port>/lc/crx/de  at Storage location.

Saved.jpg

[1] AEM 6.0 Forms Help | Configuring the Submit action

Avatar

Correct answer by
Level 2

Add a Set Value step immediately after the Workbench process start point.

Add a second XML variable to the Workbench process.

Name the second XML variable exactly the same as what's listed in Configuration Manager's Guide LC Process Locator and Invoker (http://localhost:4502/system/console/configMgr)

Edit the Set Value xpath mapping:

Location -  /process_data/NameOfFirstXmlVariable

Expression -  /process_data/dataxml/afData/afBoundData/xdp/datasets/data/FirstXmlVariableRootElement

(the Expression has to be manually typed; it cannot be selected from the editing window.)