Best Practices and Lessons Learnt BW TIBCO
Best Practices and Lessons Learnt BW TIBCO
1. Make sure that there are no spaces in the classpath you mention in the applications server settings in Admin. 2. While mentioning the classpath use %PSP% as the delimiter between two paths. Dont use colon, semicolon or something else 3. If you want to display the password as * in the global variables, make its type as password in the advanced editor
4. If you want to use a password in java code or want to map it somewhere in the input then you have to declare as type String. A password field does not appear in for the mappings 5. Do not have spaces in the names of the archives. Not in the names of applications also. 6. Use tib:render-xml function instead of Render XML activity if you are not modifying XML structure. Also, by default, Render XML activity does the XML validation, not Schema validation. Also, you can't set encoding with the function, where as with activity you can.
7. If you are mapping to dateTime or Integer/Decimal or boolean elements, make sure that
IF condition is applied on those elements before actual mapping.
8. While using Notify Configuration activity, check Local only option in the configuration tab
to allow an in-memory notification when the Wait and Notify activities are performed on the same machine. 9. If your Process Starter is a JMS Queue/Topic receiver, do not configure Message Type as XML Text, instead configure it as Text and parse the request using Parse xml acitivity. So that errors can be handle properly and efficiently. 10. Use stored procedures instead of multiple individual JDBC update activities. Stored procedure execution is faster compared to JDBC activities 11. To improve the performance of process set this parameter to true (EnableMemorySavingMode=True).
Turning this parameter on makes engine to release references to unused process data so that it can be garbage collected by the JVM. 12. If you are dealing with special characters, define the special characters in a Global Variable and use the translate() function as follows translate(source,GV,"").
13. If you are using Send Mail activity to send mail, design the TO field such that if the
environment is Prod then it should go to customer otherwise to a Global Variable TO. This can be done by right clicking the TO field of the Send Mail Activity and in the menu that appears select Statement->surround with choice Number of conditions = 1 Check Include otherwise Make the input like this] [Choose] [When] $_globalVariables/ns:GlobalVariables/ENV="Prod" to [Map the customer ID] [Otherwise] to $_globalVariables/ns:GlobalVariables/TO You need to declare two Global Variables ENV and TO Set ENV to Prod when in Production else set to Test or QA If you are using some other method to send mail like java code then also try to maintain the above functionality, as it will remove the necessity to build different ears for different environment. 14. Use Global Variables for environment dependent values like Database URLs, Username, Passwords, Ports, JNDI Provider URLs etc. This also removes the necessity to build different ears for different environments, because we can set the values of these global variables through admin console.
15. To see the input/output of any activity in a particular BW process at run time, add the
following properties in the application tra file and restart the application. Trace.Task.A/B/C/ProcessDefinition.process/ActivityName=true bw.engine.showInput=true bw.engine.showOutput=true Here A/B/C is the directory structure, Activity Name is the actual activity.
16. Whenever you change the values of global variables, and build a new ear and deploy it, do check the values of global variables in the admin console. Because it takes the old values only until you click the Reset to Default link.
17. If a particular element is required in multiple conditions, first create a Variable and map
the value to it. Then use that Variable in every condition where ever it is required. This improves a performance. 18. While dealing with DB Connections, use the following property to close the Idle DB connections java.property.bw.engine.dbConnection.idleTimeout=10 (value should be in Minutes).