cancel
Showing results for 
Search instead for 
Did you mean: 

UWL system attribut configuration - defined in: UWLSystems.cc.xml

Former Member
0 Kudos

Hi,

I'm new on the UWL development and currently working on a custom connector. I have added new attributes to the UWLSystems.cc.xml (path in configarchive file: install\meta\lib\com.sap.netweaver.bc.uwl\systems\UWLSystems.cc.xml ) so that backend informations (host ip, port, router etc.) can be configured. After deployment these values can be set in the UWL Systems configurations view.

Here my UWLSystems.cc.xml

BPMConnector is my custom connector.

confHost,confPort,confRouter,confSessionTimeout are my new defined attributes


 <ConfigClass name="UWLSystems" configurable="com.sapportals.config.plugin.default_fs.Configurable">
  <attribute name="name" type="string" mandatory="true" /> 
  <attribute name="confSystem" type="string" mandatory="true" /> 
  <attribute name="connector" type="enum" values="WebFlowConnector,BPMConnector,ActionInboxConnector,AdHocWorkflowConnector,AlertConnector" mandatory="true" default="AdHocWorkflowConnector" /> 
  <attribute name="confGroup" type="string" mandatory="false" /> 
  <attribute name="confWDSystem" type="string" mandatory="false" /> 
  <attribute name="confHost" type="string" mandatory="false" /> 
  <attribute name="confPort" type="string" mandatory="false" /> 
  <attribute name="confRouter" type="string" mandatory="false" /> 
  <attribute name="confSessionTimeout" type="string" mandatory="false" /> 
  </ConfigClass>

Now my question: How can I access these attributes within the api or is there in other way to configure those data?

I hope anyone can help me to solve this problem.

Best regards

Matthias

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you for your fast reply, but i can't imagine how this should solve my problem. Imo the IProviderConnector interface does not provide methods for obtaining custom attributs.

Because my class doesn't have any custom attributes. These should be configurable trough the UWLSystems.cc.xml and will be setted during runtime from an administrator.

Or is there a chance to add members to my IProviderConnector implementation which will be filled from the container (like auto-injection).

The attributes from this config file appears in the same area where also the system alias, group and so on are displayed.

To 1) My connector is registered with the UWL Service and works fine with currently hardcoded backend information strings.

Best regards

Matthias

Former Member
0 Kudos

Hi Matthias,

When you have made a UWl Custom connector.

1)Make sure that you have registered it with UWL using UWL service API.

2) After that you can access your connector using the following code :

IProviderConnector connectors[] =

uwlService.getRegisteredProviderConnectors();

int thisconnector = 0;

for (int i = 0; i < connectors.length; i++) {

// response.write("<br>"iconnectors<i>.getId());

if (connectors<i>

.getId()

.equals(IProviderConnector.BPMConnector))

thisconnector = i;

};

3) Then you can access the custom attributes of your BPM connector.

Regards,

Sumit Oberoi