How to Make comments required while approving the request of the user

Hi I am implementing one use case that I need to make the comments mandatory when a manager must enter comments while approving the request. And the request is raised through the quicklink. I configured the commentConfig rule also, I don’t understand when it getting called and how it works.

Hi @RajGopal

When you request access the default Business process called is LCM Provisioning.

In LCM Provisioning workflow there is a variable named requireCommentsForApproval can you make this value as true and can you try.

Also, you can use ValidationScript in Approval.


<ValidationScript>
        <Source>
// Deny Selected items
          for (ApprovalItem approvalItem : approvalItemsReject) {
          List  comments = approvalItem.getComments();
          if (comments == null || comments.size() == 0) {
          return "Please Provide comment for Work Item Rejection";
          }
          }
</Source>
      </ValidationScript>

Hi @RajGopal

You can check this option in LCM Provisioning workflow which is being used in Manage Access.

Thanks for your response.
I already enabled this option, in my LCM Provisioning workflow. But still it is not working.

Can you verify if that’s the same workflow being used in Request Access option. You can check it at Lifecycle ManagerBusiness ProcessesRequest Access

  • When I request access through Manage Access, the workflow executes correctly and enforces mandatory comments as expected.

  • However, when I initiate the same request via a custom QuickLink (configured to request a role and call the same workflow), the mandatory comments requirement is not being enforced, even though the workflow is set to Require Comments for approval.

can you verify if the workflow being referred in both cases is same