How to Write a Custom Function Program Exit involved in a Rule String that returns an XML formatted date/time in local time.

book

Article ID: 20296

calendar_today

Updated On:

Products

DIRECTORY CA Identity Manager CA Identity Governance CA Identity Portal CA Risk Analytics CA Secure Cloud SaaS - Arcot A-OK (WebFort) CLOUDMINDER ADVANCED AUTHENTICATION CA Secure Cloud SaaS - Advanced Authentication CA Secure Cloud SaaS - Identity Management CA Secure Cloud SaaS - Single Sign On SECURITY MISC CODES SINGLE SIGN ON - LEGACY CA Data Protection (DataMinder) CA User Activity Reporting

Issue/Introduction

Description:

Existing %XD% Rule String in Provisioning Templates returns an XML formatted date/time value as "yyyy-mm-ddTHH:MM:SSZ" of the current date/time instead of UTC.
The requirement is to have Rule String returning an XML formatted date as "yyyy-mm-ddTHH:MM:SSZ" of the current date/time in local time instead of UTC.
In this issue Local time is the same for IM Provisioning Server than for endpoints.

Solution:

Existing %XD% Rule String in Provisioning Templates returns an XML formatted date/time value as "yyyy-mm-ddTHH:MM:SSZ" of the current date/time in UTC.
The requirement is to have Rule String returning an XML formatted date as "yyyy-mm-ddTHH:MM:SSZ" of the current date/time in local time instead of UTC.
In this scenario the Local time is set by IM Provisioning Server clock settings and not by the endpoint servers.
For the Custom Function Program Exit;
See "Provisioning Reference Guide > Common Program Exit Reference.
This KD shows you how to build such a custom function.
From Microsoft Visual Studio 2008:
Create a new project from "Win32 Console Application" template.
Choose DLL Application Type.
See the following VC++ code performing this task.

<Please see attached file for image>

Figure 1

<Please see attached file for image>

Figure 2

Here are the include files used:

<Please see attached file for image>

Figure 3

Build the dll in release mode (e.g. etarulefunctions.dll) and copy it under the provisioning server bin folder.
(e.g.: C:\Program Files (x86)\CA\Identity Manager\Provisioning Server\bin\)

Next, from IM Provisioning Manager define a Common Program Exit with Type as DLL, location of the DLL (e.g. : C:\Program Files (x86)\CA\Identity Manager\Provisioning Server\bin\etarulefunctions.dll) and Method as XLocalDate.

<Please see attached file for image>

Figure 4

<Please see attached file for image>

Figure 5

Here is a sample involving the Custom Function Program Exit in description field of the general tab of an ADS template. Just to illustrate.

<Please see attached file for image>

Figure 6

Result in this sample is as following:

<Please see attached file for image>

Figure 7

Environment

Release:
Component: IDMGR

Attachments

1558695659922000020296_sktwi1f5rjvs16n3o.gif get_app
1558695658145000020296_sktwi1f5rjvs16n3n.gif get_app
1558695656238000020296_sktwi1f5rjvs16n3m.gif get_app
1558695654361000020296_sktwi1f5rjvs16n3l.gif get_app
1558695652600000020296_sktwi1f5rjvs16n3k.gif get_app
1558695650786000020296_sktwi1f5rjvs16n3j.gif get_app
1558695649012000020296_sktwi1f5rjvs16n3i.gif get_app