Expand my Community achievements bar.

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

Avatar

Former Community Member
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

1.2.2.1 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



1.2.2.2 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") + " @@@@@");



1.2.2.3 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

Avatar

Level 9
Hi

You might want to try using VariableLogger, at:

http://www.avoka.com/avoka/qpac_library.shtml

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.

Howard