This content has been marked as final. Show 14 replies
Sure, take a look at the JavaDocs that come with the LiveCycle Workflow SDK. Under Documentation/api/LiveCycle_Workflow_SDK_API_Reference.
FYI, in a script QPAC the PATExecutionContext is an implicit object accessed under patExecContext. In a custom QPAC it is a parameter to the execute method.
Adobe Enterprise Developer Support
I tried putting the following XML into an xml variable, but I received an error instead:
Do you know precisely how to perhaps get the proper XML results from a SELECT statement that will go into an XML variable? I used
"SELECT CLIENT_NAME as item from clients as list ORDER BY CLIENT_NAME FOR XML auto, elements" and I'm using a standard SQL QPAC to return the XML results.
Once I get the XML properly into the XML variable, I will try to use the getProcessDataValue() method.
If you have problems doing it that way, you can also download our SQLPlus QPAC, which will allow you to iterate over a result set and format the output in a number of ways, including a simple comma separated list. You can then use a simple script in the form to unpack the list into a dropdown.
It may be just as simple to write a QPAC that does the query and returns a comma-delimited list as a string. You could then have the form take that string as a hidden field and parse it into the drop-down list in the same method that Workflow provides the submission choice drop-down list.
You all provided very good solutions that I may try someday. I really mean that, but my intention with this particular workflow is to use only the tools I get out of the box. I really want to know the base components well so that I get a full understanding of what the provided QPACs can and cannot do.
That way I get to learn about how to use some of the loosly documented methods like getProcessDataValue(). Forgive my ignorance, can anyone please tell me how I am to script a call to this method, if you have used it already?
You're getting an error because that XML is not well formed so a DOM cannot be built for it. There needs to be a root node, something like enclosing all that in ....
I'm attaching a simple workflow I exported. It sets the value of an XML variable, and then using a script QPAC to call getProcessDataValue() and retrieve a Document object that can be used to parse the XML.
Adobe Enterprise Developer Support
Did you ever have any luck with this? Any additional pointers?
I think I am going to do something similar. I am planning on sending in an email that contains XML data of just 9 fields (collected from a form online - outside of the LC system and then using the Email Receiver to collect the email. The email body is the XML data). So, I need to parse this out and set the elements to variables to populate my PDF form.
If I get something working, I will try to post back.
You may be able to get a fair bit of it done just using the SetValue QPAC. I think (although I'm not sure) that you can use expressions like:
So as long as you know the number of rows you want to process, you may be able to get by.
Let us know how you get on.
Actually, I ended up doing something a little different.
Since I only have 9 fields to get parse, I did use the Set Value QPAC, but I used substring-after and substring-before functions. I had to do this in two different Set Value QPACS, I couldn't group them together for some reason. So, the body of the email contains my XML data and I set the body to a variables and then parse it out in those 2 Set Value QPACS.
It works great!