Web Form Overview

EFORMASPX

The EFORMASPX workflow application acts as a bridge between .NET web forms and WorkflowGen, and allows you to use web forms to edit your process data. See the EFORMASPX Workflow Application section in the WorkflowGen Administration Guide for information on EFORMASPX parameters and their usage.

Web form launch and submit procedures

The web form launch procedure is as follows:

  1. WorkflowGen sends the request context to EFORMASPX.

  2. EFORMASPX integrates the WorkflowGen parameters into the form data XML file, then sends the request to the web form.

  3. The WorkflowPage superclass encapsulates all of the work that must be done to retrieve the form data from the EFORMASPX storage path.

  4. The developer can focus on their web form's functionalities and ignore transfers between EFORMASPX and the web form.

The web form submit procedure is as follows:

  1. WorkflowGen gets the context and updates.

  2. EFORMASPX gets the dataOUT.xml file, updates the context.xml file with the new data, and then sends the context back to WorkflowGen.

  3. WorkflowPage writes form_archive.htm and dataOUT.xml to the EFORMASPX storage path.

  4. The web form calls the SubmitToWorkflow() method of the WorkflowPage.

  5. WorkflowGen gets the context and updates.

Form data

Form data should be a DataSet or an XmlDocument used to store all of the web form field values and the IN, OUT, and/or INOUT parameters in WorkflowGen. This form data can be edited via the web form and then transmitted to EFORMASPX by the WorkflowPage. This form data is accessible in each EFORMASPX action in the FORM_DATA required parameter.

Form archive

The form archive is a static view of a single completed action, usually stored in form_archive.htm file and accessible in the FORM_ARCHIVE data from WorkflowGen for each action containing the FORM_ARCHIVE parameter.

This form archive is automatically created on each action by WorkflowPage. You can decide whether or not you want to have it referenced in one of your workflow data.

The layout of the form archive can be customized by simply redefining the method that changes the form archive layout in the WorkflowPage class.

Action parameters

The default action parameters of your EFORMASPX actions are as follows:

Parameter

Direction

Description

FORM_FIELDS_READONLY

IN

List of fields to make read-only

FORM_FIELDS_REQUIRED

IN

List of required fields

FORM_FIELDS_HIDDEN

IN

List of hidden fields

FORM_FIELDS_ARCHIVE_HIDDEN

IN

List of fields that are hidden in the action form

FORM_ARCHIVE

OUT

Contains the form_archive.htm file

CURRENT_ACTION

IN

Usually, this parameter uses a macro that should contain the current action name

PARAMS_XPATH

IN

If you use Advanced mode but you don’t want to use the NewDataSet/Table1 structure in your form data, you can specify a custom XPath expression that leads to the parameters table in your FORM_DATA parameter

Storage path

The storage path is the location where EFORMASPX stores all of its temporary files before they are transferred to WorkflowGen. This path is unique for each web form instance. The following files are stored by EFORMASPX in the storage path:

  • context.xml

  • result.xml

  • session.xml

  • dataIN.xml

  • dataOUT.xml

The storage path property of WorkflowPage gives you access to this directory, but you should never be using those files directly. The purpose of this storage path is to store temporary files.

Best practice is to always create a sub-directory within this storage path if you want to store anything temporarily.

Attachment files will automatically be saved in the upload sub-directory if you use the methods supplied for this task.

Database connections

If you have any web controls or code-behind bound to a database, it is strongly recommended to use a connection name rather than a connection string to simplify multi-environment management. Connection names are centrally managed in the WorkflowGen web.config file.

Last updated