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)?
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 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,
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.
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.
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.
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.
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.
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.