How to show workflow result notification to user in Web Interface - ARS 8.2.1

Hi community,
I'm working on Active Roles 8.2.1 and need to display a visual notification to the user in the Web Interface after a group membership change workflow completes its execution.


The scenario is: when a user adds or removes a member from a group, a workflow triggers and calls the Microsoft Graph API to sync an attribute in Entra ID.
I want the user who made the change to immediately see the result — a green banner if the sync was successful, or a red banner with the error message if something failed.

What I have tried:
I wrote the workflow result to 3 virtual attributes on the group and displayed them in the General Properties form.
This works, but has two problems: the user has to navigate to General Properties to see the result, and the message is visible to all users who open the group, not just the one who made the change.

I also tried implementing ICustomCommand from ActiveRoles.Web.Interfaces in a .NET Framework 4.8 DLL to render an HTML banner directly on the group form.
The DLL compiles without errors and is deployed in the Web Interface bin folder, but it does not appear as an available entry in the Form Editor. 

The question:
Is there any way — whether native, through virtual attributes, Web Interface customization, ICustomCommand DLL, ASPX page modification, or any other mechanism, to display a custom notification or message to the user directly in the Web Interface as a result of a workflow execution? Has anyone achieved something similar in AR 8.2 or previous versions, and how did you solve it?


Thank you!

Parents
  • Hello Carlitos!

    The core issue is when the Graph call runs relative to the web request.

    If the sync runs in an asynchronous workflow (after the operation commits), the user's request has already returned. The Web Interface has no supported server-push mechanism, so there's no native way to deliver a banner back afterward — which is why the virtual-attribute approach is the only thing that "works," despite not being immediate or per-user.

    The one place the Web Interface surfaces feedback to the acting user, immediately and only to them, is the operation result dialog. A message raised synchronously, within the operation, appears there. Recommended pattern:

    1. Run the Graph sync synchronously in the operation — a Script activity in a change workflow, or a policy script ( onPostChange ) in the same request — not a post-commit workflow.
    2. On failure,  throw your message. Active Roles surfaces the exception text to the operator as a red error, e.g.:

    try
    {
    # ... Microsoft Graph sync call ...
    }
    catch
    {
    throw "Entra ID sync failed: $($_.Exception.Message)"
    }

    One caveat: this natively covers the error (red) case. There is no supported way to render a custom green success banner — a successful operation just shows the standard confirmation dialog. If a green result is essential, it would require Web Interface UI customization rather than a workflow/policy message.

    On your attempts: virtual attributes are object-scoped, not operator-scoped, so they can't be limited to one user; and  ICustomCommand registers a button the user invokes, so it won't fire automatically after a workflow (and won't appear until it's registered in the Web Interface configuration, not just dropped in bin ).

Reply
  • Hello Carlitos!

    The core issue is when the Graph call runs relative to the web request.

    If the sync runs in an asynchronous workflow (after the operation commits), the user's request has already returned. The Web Interface has no supported server-push mechanism, so there's no native way to deliver a banner back afterward — which is why the virtual-attribute approach is the only thing that "works," despite not being immediate or per-user.

    The one place the Web Interface surfaces feedback to the acting user, immediately and only to them, is the operation result dialog. A message raised synchronously, within the operation, appears there. Recommended pattern:

    1. Run the Graph sync synchronously in the operation — a Script activity in a change workflow, or a policy script ( onPostChange ) in the same request — not a post-commit workflow.
    2. On failure,  throw your message. Active Roles surfaces the exception text to the operator as a red error, e.g.:

    try
    {
    # ... Microsoft Graph sync call ...
    }
    catch
    {
    throw "Entra ID sync failed: $($_.Exception.Message)"
    }

    One caveat: this natively covers the error (red) case. There is no supported way to render a custom green success banner — a successful operation just shows the standard confirmation dialog. If a green result is essential, it would require Web Interface UI customization rather than a workflow/policy message.

    On your attempts: virtual attributes are object-scoped, not operator-scoped, so they can't be limited to one user; and  ICustomCommand registers a button the user invokes, so it won't fire automatically after a workflow (and won't appear until it's registered in the Web Interface configuration, not just dropped in bin ).

Children
No Data