Provisioning Form to call application name

Which IIQ version are you inquiring about?

8.4

Share all details about your problem, including any error messages you may have received.

I wrote a rule for rule type allowedvalues which is attached to the provisioning form for the application. I have a use case where I will need to call the application name depending on the which provisioning form it is calling as below and this rule will apply to the other applications provisioning form as well;

List links = identity.getLinks();
  List uidList = new ArrayList();
  List mailList = new ArrayList();
  
  if(null!=links) {
    for(Link link : links) {
      String appName = link.getApplicationName();  

      if(appName.equals(provisioningAppName)) {
        uidList.add(link.getAttribute("uid"));

      }
    

    }
  }

I am trying to find a way to get the application name through the methods in java docs under the class Forms but to no avail from the form argument. Tried getApplication, getApplicationId(), getApplicationRef(). Anyone had any luck getting the application name from the rule attached within the provisioning form?

Hi @infamous,

your rule is right, but are you sure you the identity in identity variable?

Hi @infamous,

You can get the application name from application provisioning policy like below

String provisioningAppName = application.getName();

You can try like this

List links = identity.getLinks();
  List uidList = new ArrayList();
  List mailList = new ArrayList();
  String provisioningAppName = application.getName();
  if(null!=links) {
    for(Link link : links) {
      String appName = link.getApplicationName();  

      if(appName.equals(provisioningAppName)) {
        uidList.add(link.getAttribute("uid"));

      }
    

    }
  }

Hi Andy,

Since you are using AllowedValue rule, there will be no argument ‘identity’ or ‘application’, instead you can use below line for getting application name.

String provisioningAppName = field.getApplication();

Hi @enistri_devo

Yes, the identity argument is present in the allowedvalues rule.