Save Web Form Data
You can capture web form data at multiple points in a process, and store it in a database or file system for archiving or auditing purposes. For example, capture a web form snapshot after a user submits a form and then again after a manager approves the form.
The save process isn’t visible to the end user.
How it Works
- Every web form has a data object associated with it that gets created when you create a form.
- You use input/output data association to create a snapshot of the web form's data object as a binary system. Create a simple expression that uses a
Form.getWebForm
function to access the data. You can store the form's data as either a PDF (default) or an image (PNG, JPEG or JPG) file. - You configure a service task to consume the data stream. In the service task's input data association, associate the stream data to your service method input parameter.
- Configure the service task's web service method to write the object's data to a location you select, such as a database or file system.
Form.getWebForm Function
Use the Form function in a simple expression to access the web form’s data stream:
Form.getWebForm(webFormDataObject,[format],[formName], [presentationId])
webFormDataObject
- Can be a data object or task payload objectformat
(String) - Valid values are PDF or PNG/JPEG/JPG (for image). Defaults to PDFformName
(String) - Form associated with the data object. Form name is case sensitivepresentationName
(String) - optional - Presentation Id to be rendered for the form used
Function Examples
Form.getWebform(taskWebFormDataObject, "PDF", "startWebForm")
Form.getWebform(taskWebFormDataObject, "PDF", "startWebForm", "8d4913a0-e237-dfc5-0eb5-831ddfb9e543")