Pre-populating data in XFAForm input variable when invoke process from Workbench
I am trying to pre-populate the default data for an input XFAForm variable when invoking a process directly from Workbench. The data does appear to get stored in the xfaform variable, but within the process I immediately do a Set Value operation to populate other variables from the xfaform using xpath, and the variables remain null.
The default xfaform data is in xml format, and was constructed using the instructions in the "Specifying default form data" help page from Workbench.
When I update the form via Workspace, the pre-populated data does appear, and subsequently the other variables are populated correctly, so I know the XML data and the Set Value operation are both correct.
would you expect that what I am doing should work, and any ideas why it doesn't?
The data from the xfaForm variable should be under /process_data/xfaFormvar/object/data/xdp/datasets/data
thanks for your prompt response
my Set Value operation is getting the data from there. As I say, the identical Set Value operation works fine when the form is populated in the course of a normal process, e.g. a User action that populates the form. The problem I have is specifically pre-populating an xfaform variable with data when invoking the process directly from Workbench.
Try the example short-lived process if you like:
1. input variable of type xfaform, referencing a pdf with no default data in
2. additional output variables to load specific elements of the xfaform data into
3. process contains one operation, a Set Value, that updates the output variables with the xfaform data
4. invoke the process from within Workbench, supplying a dataset to the xfaform variable
5. confirm whether the output variables contain data elements copied from the xfaform variable
I'm not sure I get exactly what you're trying to do here.
But anyways here a few things.
If your input variables is of type xfaForm, the the data you need to pass should be xdp data and not just the data set. If you're only interested in the data part of the xfaForm, you may as well use XML as your input variable (but maybe there are reasons why you do this).
Your xfaForm is pointing to a PDF, how are you merging the data with that PDF to prepopulate it?
Use the Record and Playback feature to ensure your xfaForm is populated properly.
when I invoke the process from Workbench, a popup window comes up for the xfaform input variable. The window contains two Browse buttons that let me 1) select the template URL, and 2) locate the xml data file to use as the default data for the xfaform variable in the process.
the data is being saved in the xfaform variable, but is not being picked up by my Set Value operation for some reason.
If you let me know your email, I can dump the scenario into an lca file and send it to you. my direct contact is email@example.com
Send the lca along with the data file your providing as the input at firstname.lastname@example.org.
I'll have a look at it.
for everyone's future reference, I received this email from Jasmin:
I see what you're trying to do now.
The short answer is you can't really set the data from that interface.
The only reason you see the data parameter (and the advanced settings and schema settings for that matter) is because they've re-used the same UI widget as the one you get when you create/configure a new variable.
These options should be grayed out if you ask me. You can/should log a bug with support.