With the help of this forum I have now a simple process in Workbench that acts as a Webservice to generate a sequential number.
When invoked by a PDF form it reads a value from a database, increments the value and then reads the db again to send the incremented value back to the form.
It's working great, but now I need something else: I have around 60 forms and each will have its own sequence.
The way I see it all I have to do is:
- include a new column in the db table to store the forms IDs (I have done this already).
- change the SQL statements to include the form ref number as a parameter for a WHERE clause (I have done this already).
- send the form ref number from the PDF when invoking the web service. => I still haven't figured out how to do it.
- receive this ref number in workbench to use as a parameter in the WHERE clause.
Please could someone help me here? Or point to some online example I could use as a guide?
Will I receive the info from the PDF as an XML file and extract the info from its structure?
Thank you very much for any hints.
Create an input variable in your web service process.
You can use this variable in your SQL activity to get the results.
The WSDL will populate this variable as input paramter of the web service operation.
From your form's dataconnection, you can pass the FormId to Web Service through this input parameter.
Hope that helps,
Thank you for replying!
I thought the answer would be something like this.
But how do I associate this input variable (an integer?) to the starting point or the first activity of the process?
Right now I've got two activities, the first increments the value in the data table, the other one reads the updated value.
Must I create a third activity in the begining, where I can associate the input variable?
Thank you very much!!
Any variable created within a process are accessible by all the acitivties.
You do not need to associate the value through additional acitivity.
e.g. you can directly use this variable value in the SQL activity to increment & get the next sequence number.
Note that you do not even need two SQL activities to perform this. A single SQL activity can execute multiple SQL Queries.
Hope that helps.
I simply included the variable in the SQL statement and the variable showed up in Designer when I updated the Data Connection!
And it's working perfectly now!
Thank you very much for your help!