Designing workflows for a repeatable group of questions
To design a workflow to create a single work order
For a scenario where you need to submit multiple related requests together, such as requesting laptops for several employees as a single task, design a workflow that uses the responses to a repeatable group of questions and creates one work order. When the Comma Separated Values output format is used, the workflow aggregates all responses and attaches them to the work order as a CSV file.
- Log in to the Catalog console and add a new workflow.
- In the Workflow Designer, create the following process input variables:
- Attachment: Specify this variable as a Text type variable. This variable will hold the answers to questions.
- SB Context: Specify this variable as a Service Broker Context type variable. This variable contains information and details automatically generated from a service request.
- From the workflow element palette, add the Create Work Order with Identifiers action to create a work order.
The Create work order with identifiers action has the same parameters as a Create work order, but includes additional output Identifier fields that might be necessary to be referenced in other actions in a workflow.
- Link the action to the workflow Start and End activities.

- Select the Create Work Order with Identifiers action.
- Map the process input variables as shown in the following table, so that the information that the user enters in the questionnaire is passed to the workflow:
Input Map parameter Field value Connection ID (required) Remedy Contact login ID (required) SB Context > Requested by user > Login Name Customer login ID SB Context > Requested for user > Login Name Summary SB Context > Service > Service Name Correlation ID General > Process Correlation ID Attachments Attachment
(The process input variable created earlier)
- Save the workflow.
To design a workflow to create multiple work orders, one for each set of responses to a repeatable group of questions
For a scenario where you need to handle multiple related requests separately, such as providing laptops for several employees as individual fulfillment tasks, design a workflow that uses the responses from a repeatable group of questions and creates multiple work orders. When the Object output format is used, the workflow processes each response independently and creates one work order for each response.
- Log in to the Catalog console and add a new workflow.
- In the Workflow Designer, create the following process input variables:
- all-instances: Object data type.
From the Document Definition list, select the document definition for a repeatable group of questions.
You configure this document definition in BMC Helix Innovation Studio. - sbcontext (Optional): Service broker context data type
- instance: Object data type, local variable. Represents one instance of answers to the group of questions.
- all-instances: Object data type.
- Add a Sub-Process and configure the following properties:
- Loop Type: Parallel
Loop Data Input: instances
Process variables > all-instances > instances- Input Data Item: instance (the object type local variable you created earlier)
- Add a Create Work Order with Identifiers element inside the Sub-Process.
In the Input Map section for Create Work Order with Identifiers, fill in the following fields:
Input Map parameter
Field value
Notes
Connection ID (required)
Remedy
Information is available from connection category.
Company Name
Company
Information is available from the service broker context.
Customer login ID
Custom Instance Property
User who requires the service. The user must exist in BMC Helix Innovation Suite.
From the Process variables list, select Instance > Custom Property.
- In ${processContext.instance.custom}, replace custom with login.value (where login is an alias). For example, ${processContext.instance.login.value}.
Note: A JSONPath expression specifies a path to an element in a JSON structure. An alias is used in the JSONPath expression to access the answer to a question within an instance of a repeatable group of questions. The local variable instance references one set of answers to the repeatable group of questions. An alias references one of the questions within the group and .value gives access to the answer to the question. When you create a repeatable group of questions for this workflow in the Question Designer, you map an alias to a question in the repeatable group of questions.
Contact login ID (required)
Custom Instance Property
User who submitted the request. The user must exist in BMC Helix Innovation Suite.
${processContext.instance.custom}—Update custom with contactlogin.value (where contactlogin is an alias). For example, ${processContext.instance.contactlogin.value}.
Summary
Service Name
NA
Correlation ID
Process Correlation ID
NA
Description
Service name
NA
Save the workflow.
To design a workflow that creates multiple work orders with an optional repeatable group of questions
A repeatable group of questions can be optional. If a certain condition decides whether a repeatable group of questions should be visible to the user or not, the user might not be able to see or answer those questions. When a user doesn't answer the questions, no instances are added. If the output format is Object, an error occurs when a user submits a request without adding any instances of answers to the repeatable group. To avoid this issue, use an exclusive gateway that selects which workflow to execute depending on whether a user submits answers to the repeatable group.
For example, let's say you need to provide equipment for a new employee. The repeatable group of questions are displayed to the user only if the user is a new employee. You add an exclusive gateway that selects the workflow that creates work orders only if the user responds to the repeatable group of questions.
The exclusive gateway checks whether all-instances is NULL and works as follows:
- If all-instances is not null, it creates work orders based on the instances.
- If all-instances is null, it does not create any work orders.

For more information about exclusive gateways, see Control-of-workflow-with-gateways.
To add an exclusive gateway
- Log in to the Catalog console and add a new workflow as described in To design a workflow to create multiple work orders, one for each set of responses to a repeatable group of questions.
- Add an exclusive gateway (
) and connect it to the subprocess as shown in the image.
- Define the condition for the flow that connects to the End event and configure the condition to evaluate to True if all-instances is null:

The sequence that connects to the subprocess is the default sequence flow. - Save your workflow and close the workflow designer.
- Open the Questions Designer.
- Add a conditional question to check whether the requester is a new employee, add questions for the equipment, and click Save.
For more information, see Creating-a-repeatable-group-of-questions.
Where to go from here




