NetIQ Identity Manager workflow engine has the capability to call methods in external JavaScript files. The custom JavaScript can be embedded as part of the Process Request Definition (PRD). The following steps will demonstrate the same.

  1. Open NetIQ Designer and create a PRD(Process Request Definition) from the template TemplateNoApproval
  2. Set the status to Active
  3. In the Request form, add a field of data type String and control type StaticList and name it say, Cities.
  4. Lets create a JavaScript with a method to return the array of cities
  5. Navigate to the Form tab of the PRD, you will see 4 sub-tabs under the Form Controls Section Fields, Actions, Events and Scripts
  6. Click on the Scripts tab
  7. Click on the ‘+’ button to add a script
  8. Change the type of the script to external
  9. Click on the ECMA script button in the URL/inline script column, enter the URL where the external JavaScript file is located. For example
    http://localhost/sample.js

    And Click on the Retrieve button to fetch the contents of the script.

    PRD_Sample_External_Script

    Click OK

  10. Click on the Fields Tab and select the field added in step 3 and open the properties view.
  11. Select the events property and click on the icon
  12. Add an Event by clicking on ‘+’ sign and select the event as onLoad
  13. Click on the ECMA Script icon in the Action expression and select field methods from the ECMA script objects
  14. Under field methods select setValues and enter the following
    field.setValues(setCities())

    Set_the_Values_by_calling_customized_Script

  15. Click Check syntax and Click OK on the confirmation message.
  16. Click OK to close the ECMA script editor
  17. Click OK to close the Field Events dialog
  18. Save and Deploy the PRD from Designer.
  19. To Test Make a Process Request from the Work Dashboard and check that the field has the values populated in the drop-down box.
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
By: kchendil
Mar 6, 2014
1:05 pm
Reads:
2,247
Score:
Unrated