Installing and Viewing Sample Custom Web Forms
A sample custom web form is provided when you install Workflow 2.2 SP1 and later. The sample form contains examples of some form controls, including data grids, that are supported. It features an example of how to use a DataTable table with hard-coded values to populate a data grid in the form.
Installation Location
The sample form files are available in the following directory:
<32-bit installdir>\Program\Applications\Workflow\Samples\Sample Custom Web Form.
This sample contains:
- The HTML for a web form that makes use of a jQuery data grid.
- The jQuery libraries needed to use the data tables in the form.
- A modified ActivityExtensions.dita file that makes the JSON (JavaScript Object Notation) libraries available to a workflow.
- A Workflow Project that contains:
- A workflow that demonstrates the conversion between a JSON string and a DataTable using the NewtonSoft.JSON library, as well as creating and using the data table in a Code activity. The workflow uses the JSON string to pass data for a grid into the form.
- A schedule to start the sample workflow.
- A form object that references the sample form.
Viewing the Sample Form in the Task List
- The contents of Form Web Page, including the subfolders, must be hosted on a web server.
- The file, tasklistform.min.js (in <32-bit installdir>:\Program\Applications\Workflow\SDK), must also be hosted.
- Update SampleCustomForm.html to use the correct paths for script and style imports. Use fully qualified server names (for more information, see Requirements for Creating Custom Web Forms).
- Update the following file, which can be found in the installation directory appropriate to your system architecture (32- or 64-bit), <installdir>\Program\Data\Projects\SOAProject\AppServers\Workflow\Workflow\ActivityExtensions.dita, to include the NewtonSoft.JSON library (see sample in <installdir>\Program\Applications\Workflow\Samples\ActivityExtensions).
- Restart your Workflow application server.
- Deploy the Sample Custom Form.zip project (in <installdir>\Proficy\Proficy Workflow\Program\Applications\Workflow\Samples\Sample Custom Web Form\Workflow Project\.
- Update the form Sample Custom Form (HTML) to use the correct URL for your web server (for example, https://<MyServer>:8443/SampleForm/SampleCustomForm.html).
- Enable the workflow and schedule named Sample – Show Custom Form.
- Start the Sample – Show Custom Form schedule and view the task in the Task List.
Data Grids in the Sample Custom Form
Data grids have been styled in the sample custom form using the jQuery user interface. For additional themes, go to the following web site: http://jqueryui.com/. These themes can be substituted by hosting them and updating the link in the sample form to point to the appropriate CSS.
Note: When creating other custom forms, you can use whichever style you prefer.