IBM Support

RS02822: ILRSESSIONHELPER.CREATEDEPENDENCY DOES NOT SET THE URL PROPERTY ON THE CREATED BOM ENTRY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When creating a decision service project via Decision Center
    API, using a call to
    ilog.rules.teamserver.model.IlrSessionHelper.
    createDecisionServiceProject(IlrSession session, java.lang.
    String mainProjectName,
    java.lang.String engineKind, java.lang.String... dependencies)
    IlrSessionHelper.createDependency does not set the URL property
    
    on the created BOM entry
    

Local fix

  • If you are using the Decision Center API there is an easy
    workaround that can be applied directly in the code.
    You can set the URL property on the BOM by using code like this
    
    one:
    for(String nProjectDependency : dependencies){
       IlrRuleProject projectDependency = IlrSessionHelper.
    getProjectNamed(session, nProjectDependency);
       IlrSessionHelperEx.addBaselineDependency(session, project.
    getCurrentBaseline(), projectDependency.getCurrentBaseline());
       IlrBrmPackage brm = session.getBrmPackage();
       IlrProjectBOMEntry projectBomEntry = (IlrProjectBOMEntry) ((
    IlrSessionEx) session).createElementDetails(brm.
    getProjectBOMEntry());
       projectBomEntry.setRawValue(brm.getProjectBOMEntry_
    ProjectName(), projectDependency.getName());
       projectBomEntry.setRawValue(brm.getBOMPathEntry_Url(),
    "platform:/" + projectDependency.getName());
       IlrProjectInfo projectInfo = project.getCurrentBaseline().
    getProjectInfo();
       List bomPathEntries = projectInfo.getBomPathEntries();
       int orderMax = -1;
       for (int i = 0; i < bomPathEntries.size(); i++) {
      IlrBOMPathEntry entry = (IlrBOMPathEntry) bomPathEntries.get(
    i);
    if (entry.getOrder() > orderMax) {
                 orderMax = entry.getOrder();
    }
       }
       projectBomEntry.setRawValue(brm.getBOMPathEntry_Order(),
    Integer.valueOf(orderMax + 1));
       IlrCommitableObject cobject = new IlrCommitableObject(
    projectInfo);
       cobject.addModifiedElement(brm.getProjectInfo_BomPathEntries(
    
    ), projectBomEntry);
       session.commit(cobject);
    }
    

Problem summary

  • When creating a decision service project via Decision Center
    API, using a call to
    ilog.rules.teamserver.model.IlrSessionHelper.
    createDecisionServiceProject(IlrSession session, java.lang.
    String mainProjectName,
    java.lang.String engineKind, java.lang.String... dependencies)
    IlrSessionHelper.createDependency does not set the URL
    property. This leads to the following issues: unable to export
    the decision service from the Enterprise console and when
    created a new rule project in Decision center the project is
    partially created some elements are missing. The following
    exception is raised when exporting the project: Caused by:
    java.lang.NullPointerException;
    at java.io.File.<init>(File.java:289);
    at
    ilog.rules.dataaccess.rs4j.handlers.RuleProjectInfoHandler.getFi
    le(RuleProjectInfoHandler.java:881);
    at
    ilog.rules.dataaccess.rs4j.handlers.RuleProjectInfoHandler.copyC
    ontent(RuleProjectInfoHandler.java:242);
    at
    ilog.rules.dataaccess.rs4j.handlers.RuleProjectInfoHandler.creat
    e(RuleProjectInfoHandler.java:143);
    at
    ilog.rules.model.dataaccess.HandlerBasedDataProvider.create(Hand
    lerBasedDataProvider.java:87);
    

Problem conclusion

  • The code is fixed.
    

Temporary fix

  • If you are using the Decision Center API there is an easy
    workaround that can be applied directly in the code.
    You can set the URL property on the BOM by using code like this
    one:
    for(String nProjectDependency : dependencies){
       IlrRuleProject projectDependency = IlrSessionHelper.
    getProjectNamed(session, nProjectDependency);
       IlrSessionHelperEx.addBaselineDependency(session, project.
    getCurrentBaseline(), projectDependency.getCurrentBaseline());
       IlrBrmPackage brm = session.getBrmPackage();
       IlrProjectBOMEntry projectBomEntry = (IlrProjectBOMEntry) ((
    IlrSessionEx) session).createElementDetails(brm.
    getProjectBOMEntry());
       projectBomEntry.setRawValue(brm.getProjectBOMEntry_
    ProjectName(), projectDependency.getName());
       projectBomEntry.setRawValue(brm.getBOMPathEntry_Url(),
    "platform:/" + projectDependency.getName());
       IlrProjectInfo projectInfo = project.getCurrentBaseline().
    getProjectInfo();
       List bomPathEntries = projectInfo.getBomPathEntries();
       int orderMax = -1;
       for (int i = 0; i < bomPathEntries.size(); i++) {
      IlrBOMPathEntry entry = (IlrBOMPathEntry) bomPathEntries.get(
    i);
    if (entry.getOrder() > orderMax) {
                 orderMax = entry.getOrder();
    }
       }
       projectBomEntry.setRawValue(brm.getBOMPathEntry_Order(),
    Integer.valueOf(orderMax + 1));
       IlrCommitableObject cobject = new IlrCommitableObject(
    projectInfo);
       cobject.addModifiedElement(brm.getProjectInfo_BomPathEntries(
    ), projectBomEntry);
       session.commit(cobject);
    }
    

Comments

APAR Information

  • APAR number

    RS02822

  • Reported component name

    WS DECISION CTR

  • Reported component ID

    5725B6900

  • Reported release

    881

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-07-10

  • Closed date

    2017-07-11

  • Last modified date

    2017-07-11

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • 999
    

Fix information

  • Fixed component name

    WS DECISION CTR

  • Fixed component ID

    5725B6900

Applicable component levels

  • R881 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"881","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
03 November 2021