How to access Module Properties from Java code inside an application module in BW 6.x?

How to access Module Properties from Java code inside an application module in BW 6.x?

book

Article ID: KB0094466

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
This requirement is about accessing module properties from Java code, which can be used in Java activities.

Issue/Introduction

How to access Module Properties from Java code inside an application module in BW 6.x?

Resolution

Step 1). 


- In the BW6 module, specify a dependency on package “com.tibco.bw.palette.shared.java” and “com.tibco.bw.runtime” using "Import-Package".

- Open the BW manifest editor by double clicking the "Dependencies" section under BW6 Module->Module Descriptors.
- In the ‘‘Imported Packages" section, add the dependency on package “com.tibco.bw.palette.shared.java” and “com.tibco.bw.runtime”.

Step 2).


- Add the @BWActivityContext annotation to the method which is accepting only one parameter of type "com.tibco.bw.runtime.ActivityContext”.


See the code in attached sample (Filename: AccessMP.zip).

Attachments

How to access Module Properties from Java code inside an application module in BW 6.x? get_app