Asking a question in a case
Collect a single response from a user who processes a case by using the Question shape in a case life cycle. By isolating individual questions, you can selectively capture user input without the formal structure of a questionnaire. For example, in a home insurance process, a case worker asks a customer what kind of offers they want to receive in the future.
Only standard Pega Platform applications support running a question from the case life cycle outside of a questionnaire. In applications based on Cosmos React, you can run a questionnaire by using the Questionnaire shape. For more information, see Running a questionnaire in a case.
- Add the Question shape to the life cycle of your case.
- In the navigation pane of Dev Studio, click Case types, and then click the case type that you want to open.
- On the Workflow tab, in the Life cycle section, hover over a process in a stage, and then click .
- Click Select.
- In the Answer question field, provide a name for the step, for example, Type of offers.
- Choose a question to ask:
Choices Actions Reuse an existing question - In the Question type list, select Rule.
- In the Question rule field, press the Down arrow key,
and then select the name of a question.In the Question Info section, you can verify that the question is relevant to the case.
- Optional: To ensure that the user provides an answer to the question, select the Required check box.
Create a virtual question - In the Question type list, select Text.
- In the Question text field, enter the text of the question that your application displays at run time.
- In the Map answer to property field, press the Down arrow key, and then select a property to store the value of the answer that the user provides.
- In the Route to field, press the Down arrow key, and then select
the user who is responsible for answering the question:
- To route the question to the user who currently processes the case, select Current user.
- To route the question to a specific user, select Specific user, and then, in the Operator field, enter the ID of the user to answer the question.
- Optional: To control whether your application displays the question at run time, in the Display when field, press the Down arrow key, and then select a when condition.
- Optional: To validate the answer that the user provides, configure the processing to
perform:
- In the Pre-question processing activity and Post-question processing activity fields, press the Down arrow key, and then select the name of an activity.
- In the Pre-question javascript function and
Post-question javascript function fields, enter the names of
functions that the harness of the case
includes.
- Optional: To provide additional comments about the question, in the Audit note field, enter some helpful extra text.
- Click Save.
Previous topic Troubleshooting question template errors Next topic Asking a group of related questions in a case