Hi All,
At the request of some other consultants, I'm posting a sample below of a method I use to customize the default behavior of pages in Workflow Manager.
Some things to be aware of:
--This sort of approach is outside of what is officially supported by Flexera Software's support team.
--Among other reasons, this is because when you upgrade the WFM/AES web server, it will overwrite the customizations, and you'll have to potentially rewrite them from scratch with the new pages.
--This example works by mixing the "Code Behind" model of ASP .Net to build the page content with the "Code In Page" model, overriding the (mostly unused) OnPreRender event handler to inject custom logic into the page rendering.
Without further ado, here's a customized copy of the ASP .Net Control that renders the Work Assignment page to fix up the display of AD users to be friendly usernames that I wrote for a customer (slightly edited to assume a generic domain called 'MYDOMAIN', and the AMS_SYSTEM Account used with a password of 'suams'):
Begin sc_mrasgn_ctrl.ascx
-------------------------
[CODE]
<%@ Import NameSpace="AdminStudio.Globalization"%>
<%@ Import NameSpace="System.Data"%>
<%@ Import NameSpace="AdminStudio.Data"%>
<%@ Import NameSpace="AdminStudio.Web.PageFramework"%>
<%@ Import NameSpace="System.DirectoryServices"%>
<%@ Import NameSpace="System.Data"%>
<%@ Import NameSpace="System.Data.SqlClient"%>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web" %>
<%@ control autoeventwireup="true" inherits="AMSWebApplication.MRAssignCtrl, AdminStudio.WebApplication" %>
<%@ Register TagName="UserSelection" TagPrefix="UserSelection" Src="~/_WebUserControls/UserSelectionControl.ascx" %>
<%@ Register Assembly="AdminStudioControls" Namespace="AdminStudio.Web.Controls" TagPrefix="AS_CTRL" %>
First identify the assignment Role by making selections in the Company and Role lists.
Then, enter a full user/group name or the first few letters of a name and click Check Names. (Wildcards are not supported)
- If only one item matches the search text, that item will automatically be selected.
- If multiple items match, results will be listed, and you can then further refine your search.
- To see the Application Request’s current assignments for the selected company, click the Current Assignments arrow to expand the list.
[/CODE]