Products | Versions |
---|---|
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) | 3.0,3.1,4.0,4.1,4.2 |
Problem : The call to a remote REST web service fails/not working.
Custom BPM application calls a remote REST web service passing the username token. This fails and NO error is seen in BPM logs. Only after enabling the following trace loggers, "HTTP/1.1 401 Unauthorized" can be seen in the BPM logs :
In Admin console Infrastructure -> Nodes >> BPMNode >> Configuration >> Logging >> Add >> type in the loggers >> Set Appender >> Select BPM_ROOT from the list >> select level. >> Save and Apply.
com.tibco.amx.governance (level=TRACE)
com.tibco.amx.messageflow (level=TRACE)
com.tibco.amx.bt.rest (level = TRACE)
like this :
[httpConnector_60] [TRACE] [xxxx] com.tibco.amx.governance.pa.amxcomponent.pep.httpclient.HttpClientPepResponseInterceptor - == process(HTTP/1.1 401 Unauthorized [Date: Thu, 19 Aug 2018 14:30:58 GMT, WWW-Authenticate: BASIC, Content-Length: 0, Server: Jetty(8.1.16.v20140903)]) ==
This is because the request message to the REST web-service missed the username token. The username token in the request to the remote REST web-service can be missing if the UsernameTokenCM policyset is missing for REST reference binding.
To check if the UsernameTokenCM policyset is missing for REST reference binding :
Get the SystemNode logs from the times of deployment of the problem BPM application. In a WORKING scenario it should show "Added PolicySet UsernameTokenCM to node BPMNode" for the "RESTReference_Binding", like this :
08 Aug 2018 15:00:27,029 [amxAdminDefaultHttpConnector_80] [INFO ] [] com.tibco.amx.per.adminplugin.interceptor - Added PolicySet UsernameTokenCM to node BPMNode runtime sca uri urn:amx:BPMEnvironment/test.processes#reference-binding(_LthVsIwdEeiYqZTMt6xS-A1/RESTReference_Binding)___1.0.0.20180807161503708 for urn:amx:BPMEnvironment/test.processes/Test_PackagesPageFlow_1.0.0.20180807161503708_outbound_reference__LthVsIwdEeiYqZTMt6xS-A_RESTReference_Binding
In a PROBLEM scenario the above will be missing which would be the case of missing UsernameTokenCM policyset on REST reference binding.