I made some ECMAScript which stores the contracts of a user as an
object, I thought it would make a nice abstraction layer for some of the
more fiddly bits of determining contract and identity states. This
object works a bit like this:


- user.getState() -> returns the current state of the user.
- user.toString() -> write a nice little summary for a trace.

What i want to do now is create the object in one rule and store it in a
local variable. In a following rule I want to call some of the methods
on the object.

I can do this in java with (mock code)
lv object = xpath(user:new())
and then trace it out with xpath(user:getState($object))

I'd rather not do this in Java for obvious reasons, but is this even
possible with ECMAScript in the idm engine? How can the methods existing
on the instance of the ECMAScript object be called once the object is in
DirXML object space?

Kind regards,

Albert-Jan Stevens

albertjanstevens's Profile: https://forums.netiq.com/member.php?userid=664
View this thread: https://forums.netiq.com/showthread.php?t=50482