Form Bundles Overview

   Journey Manager (JM) The transaction engine for the platform. |   System Manager / DevOps |  All versions This feature is related to all versions.

Journey Manager comes with form bundles that allow you to implement customer on-boarding solutions where a user can select several products. A form bundle contains two or more forms grouped together in a one step, so they can be used instead of building a single monolithic form. Breaking a large form into more manageable chunks makes it easier for you to develop and maintain. Form bundles also enable you to develop parts of a form concurrently.

Manager has the following form bundle features:

A sample job definition of a collaboration job for a form bundle is shown below:

{
  "jobDetails": {
    "name": "Customer Onboarding Job", 
    "processSubmitImmediate": true, 
    "version": "4.3.0"
  },
  "steps": [
    {
      "name": "Customer Onboarding",
      "type": "start",
      "actions": [
        {
          "name": "Customer Submission",
          "type": "Job Form Start",
          "redirectNext": true
        }
      ],
      "routes": [
        { "name": "Default",  "nextStep": "Additional Products" }
      ]
    },
    {
      "name": "Additional Products",
      "type": "",
      "shareExtractData": true,
      "allFormsEditable": true,
      "showPreviousForms": true,
      "redirectNext": true,
      "actions": [
        {
          "name": "Credit Cards Application",
          "type": "Job Task Assign",
          "preCondition": "$formDataMap.productCreditCards == 'true'",
          "redirectNext": true,
          "properties": [
            { "name": "Task Assign Email",  "value": "$formDataMap.emailAddress" },
            { "name": "Task Form Code",  "value": "onboard-credit-cards" },
            { "name": "Task Message",  "value": "Please complete the Credit Card Application form." },
            { "name": "Task Subject",  "value": "Complete Credit Card Application" },
            { "name": "Task Input XML Prefill",  "value": "$func.startSubmissionXml()" },
            { "name": "Task Type",  "value": "Anonymous" }
          ]
        },
        {
          "name": "Insurance Application",
          "type": "Job Task Assign",
          "preCondition": "$formDataMap.productInsurance == 'true'",
          "redirectNext": true,
          "properties": [
            { "name": "Task Assign Email",  "value": "$formDataMap.emailAddress" },
            { "name": "Task Form Code",  "value": "onboard-insurance" },
            { "name": "Task Message",  "value": "Please complete the Insurance Application form." },
            { "name": "Task Subject",  "value": "Complete Insurance Application" },
            { "name": "Task Input XML Prefill",  "value": "$func.startSubmissionXml()" },
            { "name": "Task Type",  "value": "Anonymous" }
          ]
        },
        {
          "name": "Appliction Confirmation",
          "type": "Job Task Assign",
          "preCondition": "$formDataMap.productInsurance == 'true' || $formDataMap.productCreditCards == 'true'",
          "properties": [
            { "name": "Task Assign Email",  "value": "$formDataMap.emailAddress" },
            { "name": "Task Form Code",  "value": "onboard-confirmation" },
            { "name": "Task Message",  "value": "Please sign to complete Application bundle." },
            { "name": "Task Subject",  "value": "Confirm Application Bundle" },
            { "name": "Task Input XML Prefill",  "value": "$func.startSubmissionXml()" },
            { "name": "Task Type",  "value": "Anonymous" }
          ]
        },
        {
          "name": "Review Wait",
          "type": "Job Task Wait"
        }
      ],
      "routes": [
        { "name": "Default",  "nextStep": "Application Delivery" }
      ]
    },
    {
      "name": "Application Delivery",
      "type": "",
      "actions": [
        {
          "name": "Application Delivery",
          "type": "Job Delivery",
          "properties": [
            { "name": "Delivery Mode",  "value": "All Submissions" }
          ]
        },
        {
          "name": "Application Delivery Wait",
          "type": "Job Delivery Wait"
        }
      ],
      "routes": [
        { "name": "Default",  "nextStep": "Application Completed" }
      ]
    },
    {
      "name": "Application Completed",
      "type": "endpoint"
    }
  ]
}

A typical form bundle asks users to provide their basic details, such as a name and address, and select a product or products they wish to apply for. The initial form in the form bundle is used to determine the overall flow of the collaboration job based on the products the customers selected, so it is basically triaging initial users. Therefore, this form is referred to as a triage form or a product selector form.

When a user submits the triage form, Manager performs the following:

  1. Executes the next section of a collaboration job, which is the bundle step.
  2. Associates a task with a job action.
  3. Assigns a task to the user who submitted the triage form.
  4. Redirects a browser to load the next available Form Task.

This makes the whole user experience looks like they have just moved to the next page of a bigger form.

A form bundle provides the following additional features:

  • Sharing Data Between Tasks
  • Show Previous Forms
  • Forms in the Same Step Editable
  • Preconditions
  • Dynamic Preconditions
  • Dynamic Precondition and Action Order
  • User Authentication

Let's look at each of these features in more detail.

Sharing Data Between Tasks

There are three valid options that can be taken to share data between forms in a form bundle:

No Sharing

This sets the step attribute shareFormData is false, and shareExtractData is false, so no data is copied between the forms.

Shared XML Data Model

This sets the step attribute shareFormData is true, and shareExtractData is false. When a Form Task is submitted the data is automatically written to the other forms. To use this , all forms must use the same data model. This is the most common way to share data between forms.

Share Extract Data

This sets the step attribute shareFormData is false, and shareExtractData is true. This can be used where the forms don't have a common data model. This type of sharing is also called Publish - Subscribe sharing of data extracts.

Let's demonstrate it with a simple example where a form A sets a field as a data extract Demo Type and a form B subscribes to the same data extract Demo Type. The form A is opened, the Demo Type data extract value is changed to a new value and then the form A is submitted. The Demo Type data extract is published on the save action. Because the form B has subscribed to the value, it picks its data extract and form XML is updated with the new value.

Show Previous Forms

The form bundle context is populated in the task when the step attribute showPreviousForms is true. You can see the content of the data that is returned to the form and how the form and widget can use it to display the previous forms in the form bundle.

Forms in the Same Step Editable

Forms in a bundle step are editable when the step attribute allFormsEditable is true and when the step has still not completed. This happens even if the form tasks in the step have previously been submitted.

You can use the Collaboration Job Bundle Navigation widgets to list form links to previous forms. Click on a link to open the selected form as you will be redirected to the form. You can also click on a link to download a receipt for a previous submitted form.

Preconditions

All the Job Task Assign actions in form bundle steps can have optional preconditions, such as "preCondition": "$formDataMap.productCreditCards == 'true'". The precondition is triggered, if the velocity template on the right evaluates to true, so the action instance and associated task are created.

By default, the preconditions are evaluated against a start submission. If the previous submission isn't the start submission, its possible that the data extract fields are populated in the previous submission, but are missing from the start submission. In this case, the precondition may not fire.

To fix this, you must specify the Precondition Submission step to be used for evaluating preconditions. You should replace the "Triage Step Name" with the actual step name that contains triage form submission.

{
  "name": "A Form Bundle",
  "type": "",
  "dynamicPreConditions": true,
  "shareFormData": true,
  "showPreviousForms": true,
  "redirectNext": true,
  "actions": [ ... ],
  "properties": [
    {"name": "Pre Condition Submission Step", "value" : "Triage Step Name"}
  ],
  "routes": [ ... ]
}

Dynamic Preconditions

Normal or static preconditions are evaluated once when the step is first run using the data extracts for the precondition submission. Dynamic preconditions fire after the submission of any task in a form bundle. The data extracts are taken from the form bundle and are submitted and evaluated against the actions whose preconditions have not already fired.

Actions that have already been created, as a result of the previous preconditions being true, are not affected, if their preconditions are evaluated to false now. To configure dynamicPreconditions in a form bundlestep, add the "dynamicPreConditions": true step's attribute:

Dynamic Precondition and Action Order

The order that the forms are made available in a form bundle is taken from the order they are listed in a job definition of a collaboration job. With dynamic preconditions the next form loaded is the highest one on the list that hasn't been submitted yet.

Let's use the Additional Products step of a collaboration job as an example. A user can select the insurance product option only in the triage form. The result is the insurance application and the application confirmation are created.

The next available form is the Insurance Application so it's opened next, so the user can now select the Credit Card product. The dynamic precondition is triggered and the Credit Card Application form is created.

The next available form is the Credit Card Application, because it is at the top of the list. The user submits this form.

As the Insurance Application was already submitted, the form chaining opens the next available form that is the Application Confirmation.

The Application Confirmation lists all the forms in order that they appear in the collaboration job, as shown below:

{
  "name": "Additional Products",
  "type": "",
  "dynamicPreConditions": true,
  "shareFormData": true,
  "showPreviousForms": true,
  "redirectNext": true,
  "actions": [
    {
      "name": "Credit Cards Application",
      "type": "Job Task Assign",
      "preCondition": "$formDataMap.productCreditCards == 'true'",
      ...
    },
    {
      "name": "Insurance Application",
      "type": "Job Task Assign",
      "preCondition": "$formDataMap.productInsurance == 'true'",
      ...
    },
    {
      "name": "Appliction Confirmation",
      "type": "Job Task Assign",
      ...
    },
    ...
  ],
  "routes": [ ... ]
}

User Authentication

Form bundles support both anonymous and authenticated flows, which is based on the Form or Review task. For more information on what action properties are available to the task, see action properties.

Note

Mixing of task types, such as Anonymous, Form and Review, in the same form bundle step is not supported.

Next, learn about a form bundle context.