1. Create a Simple project and define some module level properties
2. Convert the project into a java project
3. Create a java class.
4. Open the module dependencies
5. Add the following class in the dependency
com.tibco.bw.palette.shared.java
6. After selecting it, save the project.
7. Open up the class "AccessModuleProperties" and copy paste the following content.
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.tibco.bw.palette.shared.java.ModuleProperties;
public class AccessModuleProperties {
HashMap map=null;
public AccessModuleProperties()
{
;
}
@ModuleProperties
public void setProperties(HashMap maptmp)
{
System.out.println("called");
System.out.println(maptmp.size());
map=maptmp;
}
public void printProperties()
{
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next();
System.out.println(pair.getKey() + " = " + pair.getValue());
}
}
}
8. Create a java global instance
9. Choose the class and the constructor as follows
10. Create a simple process with timer to test the configuration. Add java invoke and configure it as follows
11. Run the project and it will print all the module level properties as follows