IBM Support

Template loading not working for file having two periods in its filename.

Question & Answer


Question

How do you call an API from custom code having the template file name with two periods in IBM Sterling Order Management?

Cause

Template file with name create.Order.xml is not working.

Answer

In Sterling OMS/CPQ v9.4, there has been a allowlist validation added for template names because template names can be passed by external touch points like custom code, REST APIs etc. The default allowlist does not allow period (.) in the name, however the file type can be xml.

It can be allowed to use characters selectively in template file name by specifying a suitable regular expression in the yfs property - "templatemanager.file.pattern".

For example:
If below entry is made in customer_overrides.properties file then "." will also be allowed in the template file name.

yfs.templatemanager.file.pattern=(?:\\w|.|\\/)+(?:.xml)?

NOTE: You should come up with a regular expression of your own to suit their needs. The default regex value is "(?:\\w|\\/)+(?:.xml)?". It is always better to stick to a format which is used by out of the Box templates so that such issues don't disturb the customization while upgrading to a higher version.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF014","label":"iOS"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
10 May 2022

UID

swg21986204