Application Builder query

Which IIQ version are you inquiring about?

8.X

Please share any images or screenshots, if relevant.

NA

Please share any other relevant files that may be required (for example, logs).

NA

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

Hi Team,

In the Application Builder task CSV file, can we define the Account and Manager correlation configuration or tag the rule sequences? If yes, could you please clarify how to represent this in the CSV file (we know how to do it in XML, but want to confirm the CSV format)?

Thanks.

You can’t define Account/Manager correlation rules or rule sequences in the Application Builder CSV.

Actually, I read somewhere that we can define correlationConfig in a CSV, but I’m not sure how to add it into a CSV cell. Thanks.

Any update team i’m referring this forum

Hi @sagr0812

In Application Builder you cannot add the logic for the correlationConfig or Correlation Rule directly. If you already have an correlationConfig object or Corrleation Rule available in your environment, then you can specify them in your csv file using the below column name and value as per your objectname.

Correlation CorrelationRule
IAM Correlation Config DEMOCORP-FF-Correlation-Rule

where

IAM Correlation Config is the object of type correlationConfig and DEMOCORP-FF-Correlation-Rule is the rule of type CorrelationRule.

Thanks

Thanks Manish so in that case in the csv file header is IAM Correlation Config and the relevant info as DEMOCORP-FF-Correlation-Rule we can pass right like below,

Hi @sagr0812

Sorry, forgot to update you by OOTB process we cannot set the corrleation rule or correlationconfig.

If you need to set the correlationConfig in your Application Builder then add the below code in “createOrUpdateApplications“ method inside the for loop. Apart from that you need to create a correlationHeader value in your csv and same value define it in the variable “correlationHeader“ and add the variable in “applicationObjects“. All these are present in application Builder.xml file.

For Correlation Rule, do the similar changes in your applicationBuilder.xml file and add the next piece of code that I have provided below at the same place in the method mentioned above.

// adding correlationconfig
if (applicationObjects.contains(key) && correlationHeader.equals(key) && value != null) {
        if (!Util.nullSafeCaseInsensitiveEq(value.toString(), "BLANK")) {
          try {
            CorrelationConfig config = new CorrelationConfig();
            config = context.getObjectByName(CorrelationConfig.class, value.toString());
            if (config != null) {
              application.setAccountCorrelationConfig(config);
              context.decache(config);
            }
          } catch (GeneralException configObjectException) {
            log.error("Error while fetch correlation config object." + configObjectException.getMessage());
          }
        } else {
          application.setAccountCorrelationConfig(null);
        }
      }


// adding correlation rule
      if (applicationObjects.contains(key) && correlationRuleHeader.equals(key) && value != null) {
        if (!Util.nullSafeCaseInsensitiveEq(value.toString(), "BLANK")) {
          Rule correlationRuleObj = context.getObjectByName(Rule.class, value.toString());
          if (correlationRuleObj != null) {
            application.setCorrelationRule(correlationRuleObj);
            context.decache(correlationRuleObj);
          } else {
            createRule(value.toString(), Rule.Type.Correlation, "Correlation Rule for the application: ");
            Rule correlationRuleObj = context.getObjectByName(Rule.class, value.toString());
            if (correlationRuleObj != null) {
              application.setCorrelationRule(correlationRuleObj);
              context.decache(correlationRuleObj);
            }
            log.error("correlation Rule is now created and assigned. ");
          }
        } else {
          application.setCorrelationRule(null);

        }
      }

In csv it will go like this after making the above changes. Corrleation and CorrelationRule is the header and below that, corresponding value is written.

Correlation CorrelationRule
IAM Correlation Config DEMOCORP-FF-Correlation-Rule

Thanks Manish will this apply for only account Correlation or both account and manager as well as.

This one is only for Correlation. If you want for another type of rule then the similar code with different rule type needs to be added.

I have developed a custom process on top of OOTB Application Builder functionality. With these Set of code for different attributes or rules in the app, we can build a full app without going to App definition page.

@sagr0812

Let me know which attributes of the app you need to configure, I will share the code for that.

Thanks

Thanks, Manish. I’ve developed the Application Builder task for SQL Loader and completed the basic configuration with the minimum level of attribute schema and a provisioning form. Now I’m trying to achieve account correlation and manager correlation. If you can share the full application without going through the App Definition page, it would be helpful—provided it’s not confidential.

@sagr0812

Cannot share the full applicationbuilder.xml. For correlation, I have already shared the code. If you need for Manager Correlation. I can share that.

Sure kindly share the Manager Correlation.

Add the below two variable settings at the required place. You can search in the same rule for similar settings.

private String managerCorrelationRuleHeader = "ManagerCorrelationRule";
applicationObjects.add(managerCorrelationRuleHeader);

Once this is completed. Navigate to the createOrUpdateApplications method and in the for loop section add the below code for adding Manager correlation.

// adding manager correlation rule
      if (applicationObjects.contains(key) && managerCorrelationRuleHeader.equals(key) && value != null) {
        if (!Util.nullSafeCaseInsensitiveEq(value.toString(), "BLANK")) {
          Rule mCorrelationRuleObj = context.getObjectByName(Rule.class, value.toString());
          if (mCorrelationRuleObj != null) {
            application.setManagerCorrelationRule(mCorrelationRuleObj);
            context.decache(mCorrelationRuleObj);
          } else {
            createRule(value.toString(), Rule.Type.ManagerCorrelation, "Manager Correlation Rule for the application: ");
            Rule mCorrelationRuleObj = context.getObjectByName(Rule.class, value.toString());
            if (mCorrelationRuleObj != null) {
              application.setManagerCorrelationRule(mCorrelationRuleObj);
              context.decache(mCorrelationRuleObj);
            }
            log.error("correlation Rule is now created and assigned. ");
          }
        } else {
          application.setCorrelationRule(null);

        }
      }

For CSV, add this value as column name ManagerCorrelationRule and provie the value of your manager corrleation rule.

Note: This code will create the manager correlation rule and assign it also but if it is present then it will only assign it to the app object.

Feel free to mark this as solution if it answered your question.

Thanks

Hi Manish i try that code but for correlation still it not showing, the xml file i will shared you separately on the chat box.

Hi @sagr0812 Sure, Let me check the file.

Is the correlationConfig object that you are trying to set is available in your environment. If the correlationConfig object is not available then it wont add it.

Only in the case of Correlation Rule or Manager Correlation Rule, it will create the RuleObjects but still in that rule logic needs to be added you.

Can you please confirm if the Correlation Rule and Manager Correlation is getting created by the changes.

If in that case rule is not exists, will the application builder task can’t create the rule and doesn’t do the Correlation?

There are two things on the Rule. The code that I gave you can create the rule object for the correlation and manager correlation but the logic of the correlation needs to be added by you. That logic is not known to the Application Builder.

Similarly if the correlationConfig as per your screenshot is empty because you do not have an object by that name in your environment. As the code that I gave you for correlationConfig does not create a object of that type if it is not present.