Introduction
In this task we are going to build two forms and a process that determines which actions take place based on values chosen in a form.
The first form will have a drop down which contains two different values. The process will have an exclusive gateway that will decide which actions will take place based on the values selected within the first form.
Submit a Query Form
Create your first form, this form should include:
- A Vertical Layout
- A Text Input field for Name
- A Text Input field for Email Address
- A Dropdown List with two different options (example below is for potholes and street lighting)

- A Your Query field
- A Submit button

Once submitted, create an article using the Forms Service template and relate your new form to it.
Respond to Query Form
Create the form that should be filled out by the staff member in response to the new query from the citizen.
This form should include:
- A Vertical Layout
- A Textarea Input - Basic field for Your Query. The name of this field should match the Your Query field on the Submit a Query form. This field should be Read only = True
- A Textarea Input - Basic field for Response.
- A Submit button

This form does not need to have an article created for it as it will be selected within the workflow for the user task.
Create your Workflow
Go to the iCM Modeller and create a new model.
Set Candidates to anonymous so only anonymous users can complete this workflow.
Add a Start Workflow Action, we then want to add an Exclusive Gateway. The Exclusive Gateway will go to two different Mail tasks.
The first Mail task in my example is for users who selected Potholes from the dropdown, the text for this Mail task is:
- Name: ${form_NAME}'s Pothole Query
- To: ${form_EMAIL}
- Subject: ${form_NAME}'s Pothole Query
- HTML: <p>Thank you for your enquiry (reference ${_businessKey})</p>.<p>A member of our team will review and get back to your Pothole query.</p>
Set the arrow from the Exclusive Gateway to this Mail task as the default flow.
The second Mail task in my example is for users who selected Street Lighting, the text for this Mail task is:
- Name: ${form_NAME}'s Street Lighting question
- To: ${form_EMAIL}
- Subject: ${form_NAME}'s Street Lighting question
- HTML: <p>Sorry we are unable to help at this time through this route, if you wish to discuss this further, please phone us and speak to a customer service representative. </p>
Set the arrow from the Exclusive Gateway to this Mail task as the with a condition with information from the dropdown: ${form_WHATAREA=="streetlights"}.

From the Street Lighting Email connect the End event.
From the Pothole email connect a User task. This example has the following settings:
- Name: ${form_NAME}'s Respond to Pothole query ${form_QUERY}
- Candidate Group: Choose the Workflow group used in the session
- iCM Form: select your Response Form created in the last step
Connect your User task to another Mail task, this example has the following settings:
- Name: ${form_NAME}'s Pothole Answer
- To: ${form_EMAIL}
- Subject: ${form_NAME}'s Pothole Answer
- HTML: <p>In regard to your recent Pothole query (reference ${_businessKey})</p>.<p>We can advise:-<br><br>${form_RESPONSE}<br><br>Please call us on 01234 456789 if you have any further questions.</p>
As you can see this response includes the field ${form_RESPONSE} so the email template will automatically contain the content that the user has put in the response form.
Your model should look similar to the below:

Save and close your model, and then deploy the model to make it a usable process
Add Workflow Actions to Forms
Go to your Submit a Query Form and drag on the '[Action] Workflow - Start Action'. Choose your process from the process definition dropdown, ensure it says (latest) so that you always use the latest version of the process.
Create your Custom Read Only (Form Settings > Custom Read Only) in order to see a preview table on your self service article for the task.
Go to your Respond to query Form and Drag on the '[Action] Workflow - Complete Task Action' at the end of your form.
Create a Self Service Article and Test your Process
Go to Articles, create a new article within the Staff/Intranet site and set the template to be Self Service.
Move into the Extras section
- Under Assisted Service, tick 'Do not allow to be used on behalf of another user'
- Under Filters, choose your new process from 'Select the types of process that can be seen by this article'
- Under 'Claimable Tasks' Panel, panel tick 'Show Claimable Tasks panel'
- Under 'Assigned Tasks' panel, tick 'Show Assigned Tasks panel'
Secure the article to the workflow site group
Submit the article
Test your process out by completing your first form twice choosing a different value in the dropdown each time.
