Ok have done the binding of the schema to the form, and I'm getting the information to flow as it's supposed to. The problem I'm having now, (I know I'm having a bunch.) is that once I've placed the form into my process, and I use the set value operation to pre-fill information I get the form to flow, but the rest of the information that was previously filled in is blank. So I have checked the variable and nothing wrong there. It appears the problem is how I'm using the set value operation. If I don't use the set value operation, the form retains it's information. And if I use the set value by trying to set the subform value, the form retains it's information, but no pre-fill. I'm going to try to be a little more detailed here. The xml that is returned looks like this:
0016-03-30
Mike
Public Works
alone in the dark
Type sleep
-1
Council
FYI
Important
Flowed and positioned are actual subforms on the form that have their properties set as their names indicates. The entire path is /form1/Page1/flowed/positioned . The way I was able to get the form to flow correctly upon the injection of this xml data, was to bind the subforms in the form in this manner, positioned[*]. Designer didn't place the [*] for me so I had to do this myself. But once I previewed the document, the form pre-populated and created the necessary number of subforms and placed information into the fields correctly.
Now on the process side, I have created an xfaform variable that stores the form (bound to xsd.) information, and another xml variable that stores the query return that looks like the xml listed above (has an xsd associated with it for navigating xpath). My first operation performs the query (JDBC- Query Multiple Rows as XML) and stores it into the xml variable. The next step of the process is the Set Value operation which is supposed to inject the xml data retrieved from the query into the form. Initially I tried the an xpath similar to the following:
/process_data/object/data/form1/page1/flowed/positioned = /xml_data/flowed/positioned.
No dice. On this one the form retains the information filled out by the user (didn't explain this earlier, the form is filled out first, and upon submittal the process starts.), but doesn't pre-populate the bottom part of the form. Next I tried the following xpath:
/process_data/object/data/form1/page1/flowed = /xml_data/flowed/positioned.
This time it retained the form information which was filed in by the user, but the bottom part is becomes hidden! Didn't understand this. But I started to kinda think that I had to navigate he xpath in order to correctly inject the xml into the form. That being said my next attempt was:
/process_data/object/data/form1/page1 = /xml_data
My thinking was that if on location, I stop at page1, the xml in the variable will allow it to navigate correctly through the form. Well it worked, but too well. The top part of the form is blank, but the bottom portion is pre-populated correctly. Now I'm stuck. Not sure how to get the rest of the information in the form. I thought about creating variables form each of the fields and then re-populating them after the injection of xml, but that didn't seem practical. I'm almost positive it's something I'm not doing correctly with xpath. Anyway, thanks for all your help on this.
Mike