Identity Management? I'll Get My Coat...
Attachmate No permission to run emulation
As you may know Sun Identity Manager can be used to manage identities that reside on Host systems such as 3270 Mainframes, in order to do this 3rd party libraries that provide the protocol support are required. If you try and use the Attachmate reflection for the web libraries with Sun Identity Manager and see within the application server logs the following error message:
Then you'll need to add the following to your JVM launch script:
Here's a simple example using the command line:
C:\temp\Attachmate>java -Dcom.wrg.profile.dir=c:\temp\Attachmate com.wrq.rweb.Launcher
IBM3270@D58939: No permission to run emulation.
IBM3270@D58939: Reflection shutdown
com.wrq.enterview.Glue3270 loaded. [4,297ms]
and now specifying the location of the license.jaw file that comes with Attachmate:
C:\temp\Attachmate>java -Dcom.wrq.profile.dir=c:\temp\Attachmate com.wrq.rweb.Launcher
IBM3270@676E3F: Reflection v9.5.36.100 starting [IBM 3270] **
IBM3270@676E3F: RWEB_CACHE = C:\Documents and Settings\pwalker\Local Settings\Temp\reflectionweb_pwalker
IBM3270@676E3F: RWEB_PREFS = C:\Documents and Settings\pwalker\reflectionweb
IBM3270@676E3F: USER_HOME = C:\Documents and Settings\pwalker

Posted at 12:06PM Jan 22, 2008 by Paul Walker in Handy IDM Bits |
Java Date Comparisons In Identity Manager
During my POC rounds I often come up against Identity Management requirements to manipulate date strings, for example, a contract hire date coming from a HR feed inside a CSV file, when should this user be provisioned? When should this user be deprovisioned? How long should this compliance violation be mitigated?
I'm often re-writing the same piece of logic so the logic implies that others using Sun Identity Manager are doing similar, so I'll post my contribution to this blog mainly to stop me loosing it all the time (doh)...
So here's the java version with the code logic adapter to XPRESS. Just to note that from within Identity Manager both Java and XPRESS can be called so you're free to select your poison ..
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
public class DateTestEADS{
public static void main (String args[]){
String dateString = "31.10.2007";
Calendar todayCal = Calendar.getInstance();
Date todayDate = todayCal.getTime();
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy") ;
// Parse the date
try {
Date endDate = format.parse(dateString);
System.out.println("Original string: " + dateString);
System.out.println("Parsed date : " + endDate.toString());
System.out.println("Todays date : " + todayDate);
Calendar endCal = new GregorianCalendar();
endCal.setTime(endDate);boolean result = endCal.after(todayCal);
System.out.println("Q:Is the date " + dateString + ", after today? A:"+result);
}
catch(ParseException pe) {
System.out.println("ERROR: could not parse date in string \"" + dateString + "\"") ;
}
}
}
Here's the same logic in XPRESS
<RuleArgument name='dateString' value='31.12.2007'>
<Comments>A date such as "31.10.2007" as a string</Comments>
<String>31.12.2007</String>
</RuleArgument>
<block>
<defvar name='todayCal'/>
<defvar name='todayDate'/>
<defvar name='endDate'/>
<defvar name='endCal'/>
<defvar name='format'/>
<set name='todayCal'>
<invoke name='getInstance' class='java.util.Calendar'/>
</set>
<set name='endCal'>
<new class='java.util.GregorianCalendar'/>
</set>
<set name='todayDate'>
<invoke name='getTime'>
<ref>todayCal</ref>
</invoke>
</set>
<set name='format'>
<new class='java.text.SimpleDateFormat'>
<s>dd.MM.yyyy</s>
</new>
</set>
<block name='parse the date'>
<set name='endDate'>
<invoke name='parse'>
<ref>format</ref>
<ref>dateString</ref>
</invoke>
</set>
<invoke name='setTime'>
<ref>endCal</ref>
<ref>endDate</ref>
</invoke>
<invoke name='after'>
<ref>endCal</ref>
<ref>todayCal</ref>
</invoke>
</block>
</block>
Posted at 10:14PM Dec 05, 2007 by Paul Walker in Handy IDM Bits |
Today's Page Hits: 72
| « May 2008 | ||||||
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | |
| Today | ||||||
www.flickr.com
|