Workflow Tips for Identity Manager



A Forum reader recently asked:

"I have a workflow where a manager can select a user and the applications they have access to. (The applications are in a checkbox pick list from a global query on load.) On the approval form, I can display the values I want with entity key for DN expression lookup; but I am unable to figure out a few things past that.

1) How do i automatically have the "chosen" applications from the request form to show up "checked" on the approval form?

2) I know how to use the display expression to show the values I want, but I want to be able to set a different value (not the DN) on my entity action. Basically, I want to read my application object for the CN value and place that on my user object."

And here's the response from Rudy Duym ...


You can use the or method :*string? || array?*/ values)

This highlights the entered text if the control is a Text, DNMaker, DatePicker or TextArea control. For list or choice-based controls, this will select the choice(s) corresponding to the values parameter. If no values are passed in, the first field option will be selected.

Note: When an array of values is passed in only the first value will be considered. This will be without effect on disabled or invisible fields. This can also trigger the onchange event for the current field.

Examples:"a"); // select the option "a" in a StaticList["choice1", "choice2"]); // preselects 2 choices in a PickList of MVCheckbox

As to your second question, maybe you can use IDVault.get() to get the cn value either in the form or in one of the workflow mappings. For example:

/*array*/ IDVault.get(/*string?*/ fieldname, /*string*/ dn, /*string*/ entity_key, /*string*/ attribute_key)

This corresponds to the IDVault.get() function of the workflow script engine. It retrieves the value(s) of the attribute for the given entity. The result will be an array of values. If the "field" parameter is specified, the result of the query will be used to refresh the content of the field. If you specify a null value for the fieldname, it will be up to the form developer to use the result of the query.

The method returns an array with the data values. For example:

var s = IDVault.get(null, dn, "user", "LastName"); field.setValues(s[0]); // s[0] contains values for last name



How To-Best Practice
Comment List
Related Discussions