Multi Step External Form Receive Data From Form (ASP.NET)
  • Updated on 14 Aug 2014
  • 3 minutes to read
  • Print
  • Dark

Multi Step External Form Receive Data From Form (ASP.NET)

  • Print
  • Dark

TheExternal Form step was designed in Decisions to interact with forms using html methods or service calls.External Form step could be found in the Flow Designer in the ToolBox under Forms[Interaction] category. This method can also pass data into external form and retrieve data from the external form.

In this example, we are going to interact with an external multi-step form from our flow using External Form step. The key point of this example is that the external form is written wizard-like using ASP.NET. In other words, it does not call back to Decisions until it is submitted to do so. And when all the steps of the form are completed it calls back to our Flow and sends back data from all its steps.
We begin by clicking Create Flow from our Designer Folder's Actions menu. Begin by selecting the External Form Step , add or drag and drop into the flow designer. Next, locateUrl parameter for our External Form step and choose Constant for the Mapping Type drop-down.

Input URL to our External Form into Value textbox under Url setup options.

Next, under Service Definition options locate Service Outcome box and click Add New link to add new outcome to our External Form step. In the resulting pop-up window we give our outcome name and add Parameters . These parameters are going to hold pieces of data that we are expecting our form returns back to us. When finished we click Ok to save and close this pop-up window.

Mention that there is View Integration Detail link for the External Form step. If we click it we are able to see information about different ways in which our flow step can interact with our external form.


Back to the Flow Designer, we can connect our steps to complete our flow. Next, we click Debug Flow link from the top panel of our Flow Designer to test our flow.
Note that in Decisions version 3.5 and above, you'll need to click Test Flow to access the Debugger.


Our External Form opens in a new window and we are able to fill out first step of our form and click next to proceed to the next step. Mention that our flow freezes and waiting for the form to be submitted.

We fill out second step of our flow and now we can click next to proceed to the next step or click back to return to the first step to change some inputs. And our flow is still waiting for the form to be submitted and sent.

Third page of this form simply displays all our inputs from the previous steps... If we click Send our form is being submitted... It closes and calls back to our Flow... Next, our flow runs to its end.

This External Form was built in ASP.NET and uses Data that was sent to it in URL from Decisions to build a New URL to send Data back to Decisions on Submission. It was designed as following in this External Form:

 protected void btnSend_Click(object sender, EventArgs e)
// store data into database
        string redirTo = "";
        string callbackurl = "";
        string stepId = "";
        string flowId = "";
        string otherinputs = "";
        string url = HttpContext.Current.Request.Url.Query;
        string[] pairs = url.Split('&');
        for (int i = 0; i < pairs.Length; i++)
                string tmp = pairs[i];
                if (tmp.IndexOf("step") != -1) {
                stepId = tmp.Substring(1);
                    else if (tmp.IndexOf("flow") != -1) {
                    flowId = tmp;
                        else if (tmp.IndexOf("call") != -1) {
                        callbackurl = tmp;
                            else {
                            otherinputs += tmp;
        if (callbackurl.Length != 0) { 
        redirTo = "http://decisions/decisions/nosl/?action=PostCustomFormDataToFlow" +
            "&" +
            + "&"
            + stepId +
            "&OutcomePath=Done" + "&FirstName=" + tbFirstName.Text +
            "&LastName=" + tbLastName.Text +
            "&Age=" + tbAge.Text +
            "&Phone=" + tbPhone.Text +
            "&Enail=" + tbEmail.Text +
            "&Address=" + tbAddress.Text;
        Response.Redirect (redirTo);

And we can see that the flow ran with no errors. Under Data tab in our debugger if we click on our form's outcome we can see that all our outcome Parameters are holding values that were sent to them from the external form.

Note: This will not work on in crossdomain environment. For example if Portal Base URL in format [machine name]/decisions/Primary and we try to call Form on localhost .
External Form used for this tutorial can be downloaded here: MultiViewASP

Was this article helpful?