Passing Data to External Forms (Basic)
  • 03 Jun 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Passing Data to External Forms (Basic)

  • Dark
    Light

Article summary

Overview

The External Form step was designed in Decisions to interact with forms using HTML methods or service calls. This method can also pass data into the external Form and retrieve data from the external Form.

This will not work in a cross-domain environment. 
  • For example, if Portal Base URL in format [machine name]/decisions/Primary and the Form is called on localhost.

Example

In this example, pass data from Decisions to an external ASP.NET web form, and display this Data as Form Labels.

The External Form used in this tutorial can be downloaded below: 

This External Form was designed in ASP.NET. Please navigate to Simple External Form Process-Preparation, to learn about setting up the External Form in IIS.

  1. Begin by selecting Create Flow in a Designer Folder.
  2. Next, Name the Flow and click Create to proceed to the Flow Designer.
  3. In the Flow Designer, drag and drop the External Form step from Flows, Rules, Forms, and Reports > Forms[Interaction] category.  
  4. With the External Form step selected, navigate to the Properties panel. 
  5. In the Service Definition > Service Name text box, give the Service a name. Under Service Outcome select 'Add New.'
  6. In the resulting dialog, give the Outcome a name. For this example, Data is not expected to be returned from the external Form, so Parameters don't need to be added.
  7. Select OK to save and close.
  8. To send data to the Form, populate the External Form step with data to send. To do this, locate Expose Data On Service box and click Add New link to add a new input Parameter. 
  9. In the resulting dialog, provide the Name to the parameter and choose the Type.
  10.  Select OK to save and close the Add Expose Data On Service window. There are five Expose Data on Service parameters: Comment (String), Company (String), Email (String), Name (String), and Phone (String).
  11. Under Inputs, type Constant values for all the Exposed Data that was added to populate the Parameters with the values to send to the External Form. 
  12. Under Inputs > Url, type a Constant URL to the External Form. This URL is set up when creating the Virtual Directory in IIS.

Debug

  1. Select Debug in the top panel of the Flow Designer to test the Flow.
  2. The Form opens in a new window and is populated with the information that was sent to it. The Data added to the Service Definition is appended to the URL.
  3. Back in the Flow Designer, notice that the Flow ran with no errors. 
  4. Additionally, select the View Input/Output Data dialog on the External Form step in the debugger. The External Form step outputs preferedmode, InstanceName, OutcomePath, stepTrackingId, flowTrackingId, and action. These are outputs that were defined within the External Form. 

Was this article helpful?