Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Asking a question in a case

Updated on March 29, 2022

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.

Before you begin: Create a question that you want to ask in the case. For more information, see Adding a question to a question page.
  1. Add the Question shape to the life cycle of your case.
    1. In the navigation pane of Dev Studio, click Case types, and then click the case type that you want to open.
    2. On the Workflow tab, in the Life cycle section, hover over a process in a stage, and then click StepMoreAutomationsQuestion.
    3. Click Select.
  2. In the Answer question field, provide a name for the step, for example, Type of offers.
  3. Choose a question to ask:
    ChoicesActions
    Reuse an existing question
    1. In the Question type list, select Rule.
    2. In the Question rule field, press the Down arrow key, and then select the name of a question.
      Note: You cannot select a complex question, because only questionnaires support complex questions.
      In the Question Info section, you can verify that the question is relevant to the case.
    3. Optional: To ensure that the user provides an answer to the question, select the Required check box.
    Create a virtual question
    Note: Virtual questions are not reusable. Use this approach only when you are collecting a text response and the question is specific to the process that contains the Question shape.
    1. In the Question type list, select Text.
    2. In the Question text field, enter the text of the question that your application displays at run time.
    3. 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.
  4. 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.
  5. 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.
    For example: Display a question about a vehicle engine number only if the customer's insurance covers the type of accident that a customer had.
  6. Optional: To validate the answer that the user provides, configure the processing to perform:
    1. 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.
      For example: Your application runs these activities when the user is online.
    2. In the Pre-question javascript function and Post-question javascript function fields, enter the names of functions that the harness of the case includes.
      For example: Your application runs these functions when the user is offline.
      Note: Applications based on Cosmos React do not support pre-question and post-question processing. You can run these activities and JavaScript functions only in standard Pega Platform applications.
  7. Optional: To provide additional comments about the question, in the Audit note field, enter some helpful extra text.
  8. Click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us