Custom property file in location different than default
Use custom properties thatr is defined in folder different than default one, where default one is installFolder/properties.
If we want to define file in any folder and use property values from it by sci-get-property() function, do the following:
-
Create property file in e.g. installFolder/MIRJANA/mirjana.properties
-
Content of mirjana.properties is:
propName = propValue
-
Define the following line in installFolder/properties/servers.properties that is correlation between property file name and its location in the file system.
myCustomProp=C:/SterlingCommerce/SI50/install/MIRJANA/mirjana.properties
-
Run setupfiles.sh and restart the system
-
Create the following BP, to refresh cache with custom property values and take property by sci-get-property() function
<process name="default">
<sequence>
<operation name="Cache Refresh Service">
<participant name="CacheRefreshService"/>
<output message="CacheRefreshServiceTypeInputMessage">
<assign to="." from="*"/>
<assign to="cache_name">myCustomProp</assign>
<assign to="cache_type">properties</assign>
</output>
<input message="inmsg">
<assign to="." from="*"/>
</input>
</operation>
<assign to="VAR" from="sci-get-property('myCustomProp','propName')"/>
</sequence>
</process>
-
Result in the process data is:
<?xml version="1.0" encoding="UTF-8"?>
<ProcessData>
<VAR>propValue</VAR>
</ProcessData>