Custom property file in location different than default

Mirjana's picture

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:
 
  1. Create property file in e.g. installFolder/MIRJANA/mirjana.properties
 
 
  1. Content of mirjana.properties is:
 
propName = propValue
 
  1. 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
 
  1. Run setupfiles.sh and restart the system
 
  1. 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>
 
 
  1. Result in the process data is:
 
<?xml version="1.0" encoding="UTF-8"?>
<ProcessData>
      <VAR>propValue</VAR>
</ProcessData>