05-08-2012 02:25 AM
Hi Blaze Experts,
There is a Decision Table instance which capture printer details. This will be used to identify to which printer should be routed to. Later it has been identified that, the printer configuration is going to change per environment. For example, the printer id’s for A is different from B and C. There is no attribute in decision table to capture environment, which might have allowed us to pick correct printer depending on environment.
To over the above issue, I am thinking for having one decision table per environment. We need to have some switch mechanism in rule flow to pick correct decision table depending on environment. The environment identifier should be loaded from a properties file and loaded into rule base. This value should be used to switch and select correct decision table instance.
Technically Please can any one help or explain
How to implement this scenario and how to write the rule ?
Where should i define properties file ?
How to import into decesion table ?
Solved! Go to Solution.
05-10-2012 11:30 PM
You could do this for example.
1) Declare a variable in your ruleflow that will hold environment ID and initialize it with System.getProperty(<name of the property>). You may need to import java.lang.System class in a Java BOM to make it accessible to Blaze rules.
2) Add condition node to the ruleflow that selects different path depending on the value of the variable. Each path would have a task pointing to the decision table for that environment.
3) Add environment ID to Java's startup parameters (-D<name of the property>=<value>).
Blaze Solution Architect