Custom Approval UI in IIQ using Plugin (Dynamic Risk Acknowledgement)

Hello Team,

I am working on building an IIQ Plugin for an Exception Request framework and need some guidance on implementing a custom approval UI.


:small_blue_diamond: What I have built so far

  • A plugin that dynamically generates an exception request UI (XHTML) based on a Custom Object.

  • All fields and validations are driven from configuration (Custom Object).

  • The request is submitted via a short-lived dynamic link.

  • Once submitted, the request is passed into the LCM Provisioning Workflow so that I can leverage OOTB features like:

    • IdentityRequest

    • Approval steps

    • Audit trail


:small_blue_diamond: Current Requirement

At the approval stage, I want to:

  1. Populate the approval page using exceptionModel

  2. Display a dynamic list of risks

  3. Allow approvers to:

    • Review each risk

    • Acknowledge each risk via checkbox

  4. Prevent approval unless all risks are acknowledged

Additionally, I want the UI to be card-style (modern layout) rather than standard form layout.


:small_blue_diamond: What I tried

1. OOTB Form Renderer

  • Created a static form and passed values via exceptionModel

  • Works fine for displaying request data

:cross_mark: Limitation:

  • Dynamic risk section is difficult to implement

  • <Field type="boolean"> requires static fields

  • Cannot render dynamic checkbox list cleanly


2. Embedded HTML in Form Field

Used:

<Attributes>
  <Map>
    <entry key="contentIsEscaped" value="true"/>
  </Map>
</Attributes>

:check_mark: Works for:

  • banners

  • read-only formatted content

:cross_mark: Does NOT work for:

  • input elements (checkboxes behave like plain text)

  • binding user input back to workflow


3. Exploring Custom Renderer (JSF via Plugin)

I am now trying to use a custom XHTML renderer via plugin to achieve:

  • dynamic UI rendering

  • proper checkbox binding

  • better UX


:small_blue_diamond: Question

Is it possible (and recommended) to implement a custom HTML/JSF-based approval UI via IIQ plugin for work items?

Specifically:

  • Can we fully replace the approval form UI with custom XHTML?

  • What is the best way to bind dynamic inputs (like checkboxes) back to formModel?

  • Are there any best practices or limitations when using custom renderers for approval pages?


:small_blue_diamond: Goal

To build a dynamic, configurable approval UI that:

  • renders risks dynamically

  • enforces acknowledgements

  • integrates cleanly with IIQ workflow and IdentityRequest


Any guidance, examples, or best practices would be really helpful.

Thanks in advance!

@dheerajk27 Why can’t you use existing renderer for approvals?

Hi @neel193 ,

Thanks for replying, existing renderer is now working when i am trying to used formModel to populate static form with dynamic Risk, i am getting output as below:

expected:

@dheerajk27 Could you please attach your plugin for review?

AFAIK IIQ is using commonWorkItem.xhtml as the default renderer and pass the controls to the ones which you define in workflow. Seems to bind it properly, you might want to modify commonWorkItem. Let me also read it further and get back.

Please also check this post: Approval workitem is not getting rendered with a custom xhtml

@dheerajk27

  1. How your plugin is waiting for approval is it single page where you need immediate approvals from the luncher? if so why approval
  2. If you are sending approval to the other users then best way to call an workflow from your plugin to launch the default approval workitem from the workflow itself and proceed further
Workflower workflower = new Workflower(context);
WorkflowLaunch launch = workflower.launchSafely(workflow, caseName, variables);

Hi @debiprasad24 ,

I am already callimg workflow from plugin, but i need custom ui for workitem page for approval.

@dheerajk27

  1. We can’t create a complete page for the approval workitem page but you can use js injection to custom inject js to the same page based on your customization

@dheerajk27 Did you get any workaround?

Hi @Neelam,

Thanks for checking on me, yes i managed to get it through by building the dynamic form using html tables and then edated the work item form in approval step using Intercepter script.

One point to make though when using html tables in a field, it is important to not have any type set to field and also field should be created with no name. If you create a named field and keep html tags, approve button fails validating the form and it does not work.

I removed the field name and removed the field type, it worked.