I've created a workflow which revokes roles from a selection contained
in a picklist on the request form. The role request uses the following
sequence of methods to return the DN of each role in the picklist


I also need to be able to call this workflow from another workflow
kicked off by a driver, without user intervention. So no forms full

I decided to create a mapping activity in the calling workflow to
pre-populate the flowdata object with the list of roles. My
understanding is that flowdata objects are arraylists and i can easily
create an arraylist in a mapping activity the values of which will
display in a picklist without any issues. However to make sure the above
code works I need to replicate the actual structure of a flowdata object
formed from a picklist and this is seemingly a more complicated problem
that I am struggling to understand.

Some investigation suggests that post mapping a picklist to flowdata
will create an arraylist of nodes which contain child text nodes whose
values are the DNs from the picklist. How can i replicate this
programatically in a mapping activity so that my above code for getting
the DN will work regardless of whether the roles where chosen in a
picklist and mapped to a flowdata variable or just passed in from a
mapping activity?

The Node implementation used seems to be
org.apache.xerces.dom.DeferredElementNSImpl, and the class of the child
node is org.apache.xerces.dom.DeferredTextImpl but i'm having difficulty
constructing these nodes. I had a go using something like the code

Any ideas if there is an easier way of doing this?



var arraylist = new java.util.ArrayList()

//Create DeferredElementNSImpl - code fails here because there is no constructor for this class?!
var picklist = new Packages.org.apache.xerces.dom.DeferredElementNSIm pl()

//Set Node Value - just guessing here because toString method for arraylist elements returns [picklist: null] - not sure what that means

//Create DeferredTextImpl
var text = new Packages.org.apache.xerces.dom.DeferredTextImpl()

//Set Node Value
text.setNodeValue("role dn would go here")

//Append Text Node to Node

//Add Node to ArrayList

KKnowles_Praxism's Profile: https://forums.netiq.com/member.php?userid=538
View this thread: https://forums.netiq.com/showthread.php?t=45013