Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

1\tUnable to retrieve the form values entered by the user from the xpath expression(with or without s


Not applicable
1.1 Description of the Workflow

We have designed a Workflow, which has an init form HighLevelQuestionnaire.

1. The user attempts to start the workflow by submitting this form, which has an XML schema embedded.

2. When user submits the data, we set workflow variables to fetch data from the init-form and all the values entered by the user are stored in the database.

3. Based on the values, value of Risk Level is calculated to be either High or Medium, and user is routed to one of the two routes.

4. The user QPAC is used to show the next form to the user.

Another form has been designed called AssessRisk in which user is asked to confirm the Risk Level.

5. At this point, we use Script QPAC to print the values in the log.

1.2 Problem description

1. In the Point No. 6 of the workflow, the values are not printed in the log. A blank space is printed instead.

2. Initially, we embedded the schema in the form. But when values were not printed, we removed the schema. Even then it didnt work.

1.2.1 User QPAC Specifications

Properties of user QPAC used in Step 4 of the workflow

Mappings Tab: -

Input Variable --- No variable

Template URL ----- Form11.xdp

Output Variable ---- myform

Myform is a form-variable, which has template URL as Form11.xdp

1.2.2 Script QPAC With XML Schema embedded

import com.adobe.workflow.pat.service.*;

System.out.println("----------- High Level Questions -----------");

System.out.println("--1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/datasets/data/RiskLevel/general/Risk_Level") + " @@@@@");

Note:- Here RiskLevel is the schema root of myform and Risk_Level is the schema variable mapped with textfield on the form Without XML Schema embedded

System.out.println("--1.1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/datasets/data/fields/Risk_Level") + " @@@@@"); Conclusion

In both the cases, a blank value is printed. In both the cases, we get some output which is when we use

System.out.println("--1.1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/datasets/data ") + " @@@@@");

In this case all the values are printed with space in between.

This is the basic feature which has to be used while developing workflows.
1 Reply


Level 9

You might want to try using VariableLogger, at:

It's a little more reliable than the script QPAC, especially if one of your xpath expressions is wrong.

Please note that embedding the schema makes no difference in how the data from the form is stored. What makes the difference is whether your fields are bound to specify schema elements, or whether they use the "normal" binding.