This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 996010 - RTGov logs interface for one-way operation as null value
RTGov logs interface for one-way operation as null value
Status: CLOSED CURRENTRELEASE
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity medium
: ER2
: ---
Assigned To: Gary Brown
Jiri Sedlacek
: Reopened
Depends On: 996366
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 04:16 EDT by Jiri Pechanec
Modified: 2015-08-02 19:44 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-06 10:27:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Reproducer (16.45 KB, application/x-compressed-tar)
2013-08-12 05:11 EDT, Jiri Pechanec
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker RTGOV-248 Major Closed One way interactions between services do not identify the 'interface' 2014-07-02 05:19:47 EDT

  None (edit)
Description Jiri Pechanec 2013-08-12 04:16:50 EDT
Try to invoke a one-way operation and look at generated Activities.

Examples for RequestSent and RequestReceived activities
10:08:57,134 INFO  [org.jboss.soa.qa.rtgactivity.RTGovSwitchYardTest] (pool-1-thread-10) Asserting RequestSent: serviceType={urn:switchyard-soa:rtgov_activity_generation:0.1.0}InventoryService/LoggingService interface=null operation=logMessage fault=null messageType=java:java.lang.String content=null
10:08:57,134 INFO  [org.jboss.soa.qa.rtgactivity.RTGovSwitchYardTest] (pool-1-thread-10) Asserting RequestReceived: serviceType={urn:switchyard-soa:rtgov_activity_generation:0.1.0}InventoryService/LoggingService interface=null operation=logMessage fault=null messageType=java:java.lang.String content=null
10:08:57,143 INFO  [org.jboss.soa.qa.rtgactivity.RTGovSwitchYardTest] (pool-1-thread-10) Asserting RequestSent: serviceType={urn:switchyard-soa:rtgov_activity_generation:0.1.0}OrderService/InventoryService interface=null operation=reserveItem fault=null messageType=java:org.jboss.soa.qa.shared.data.OrderItem content=null

See interface field. For two-way operations the interface is logged correctly
Comment 1 Gary Brown 2013-08-12 04:24:51 EDT
Can you provide the app to reproduce, with an example message.
Comment 2 Jiri Pechanec 2013-08-12 05:11:01 EDT
Created attachment 785622 [details]
Reproducer

See modified camel-binding quickstart - there is a logging service added

Run the quickstart - be careful with directory settings, it needs to be changed
Then run the REST request

{"expression": "SELECT act FROM RPCActivityType act LEFT JOIN FETCH act.context LEFT JOIN FETCH act.properties" } 

on url http://localhost:8080/overlord-rtgov/activity/query

The answer should contain
   {
    "type":"RequestSent",
    "serviceType":"{
    urn:switchyard-quickstart:camel-binding:0.1.0
}GreetingService/LoggingService",
    "operation":"log",
    "messageType":"java:java.lang.String",
    "timestamp":1376298336203,
    "unitId":"872766c6-c858-449b-b82b-83421c1fcc2e",
    "unitIndex":1,
    "context":[{
    "value":"ID-jpechane-34089-1376298164800-3-5",
    "type":"Message"
}]
},
    {
    "type":"RequestReceived",
    "serviceType":"{
    urn:switchyard-quickstart:camel-binding:0.1.0
}GreetingService/LoggingService",
    "operation":"log",
    "messageType":"java:java.lang.String",
    "timestamp":1376298336203,
    "unitId":"872766c6-c858-449b-b82b-83421c1fcc2e",
    "unitIndex":2,
    "context":[{
    "value":"ID-jpechane-34089-1376298164800-3-5",
    "type":"Message"
}]
},
    {
    "type":"RequestSent",
    "serviceType":"{
    urn:switchyard-quickstart:camel-binding:0.1.0
}GreetingService/LoggingService",
    "operation":"log",
    "messageType":"java:java.lang.String",
    "timestamp":1376298336210,
    "unitId":"872766c6-c858-449b-b82b-83421c1fcc2e",
    "unitIndex":3,
    "context":[{
    "value":"ID-jpechane-34089-1376298164800-3-7",
    "type":"Message"
}]
},
    {
    "type":"RequestReceived",
    "serviceType":"{
    urn:switchyard-quickstart:camel-binding:0.1.0
}GreetingService/LoggingService",
    "operation":"log",
    "messageType":"java:java.lang.String",
    "timestamp":1376298336210,
    "unitId":"872766c6-c858-449b-b82b-83421c1fcc2e",
    "unitIndex":4,
    "context":[{
    "value":"ID-jpechane-34089-1376298164800-3-7",
    "type":"Message"
}

Note the missing intefrace field
Comment 3 Gary Brown 2013-08-12 11:10:32 EDT
Marked as not a bug, as this information is not provided, on 'inbound' exchanges between services, by switchyard. Therefore it is not possible for rtgov to log this.

As a workaround, for two way interactions, the interface on the 'outbound' exchange is applied to the activity events representing the inbound interaction, after the fact.
Comment 4 Gary Brown 2013-08-12 11:18:39 EDT
Just to be clear, this is not an rtgov bug, which is why I closed it - however I believe this information should be provided, so possibly needs to be raised as bug against switchyard.

RTGov currently uses the org.apache.camel.management.event.ExchangeCreatedEvent, although the same problem exists with org.switchyard.runtime.event.ExchangeInitiatedEvent.
Comment 5 Jiri Pechanec 2013-08-13 00:31:55 EDT
I am re-opening the bug and making it a dependency on SY bug that should provide the necessary information. If the SY issue will solve the problem we can close it together.
Comment 6 Gary Brown 2013-08-13 05:37:28 EDT
Have found a workaround for this, that sets the interface and also scopes the oneway interaction (i.e. records response sent/received events).

So you may want to close the switchyard issue. I'm testing the fix currently, but looks like it will be fine, so should apply to product branch shortly.
Comment 7 Keith Babo 2013-08-20 12:02:41 EDT
It's not clear to me what exactly is missing on the SwitchYard side.  At the point the exchange is initiated, the consumer has been identified, but the provider has not (that's assigned in the addressing handler).  This means the consumer's contract information *is* present on the exchange.  This holds true inbound or outbound, in-only or in-out.

This bug seems to talk about what's missing on the RTGov side and the SY bug that was created merely references this one.  Can someone point out the exact information which should be there that is missing?
Comment 8 Gary Brown 2013-08-20 12:13:57 EDT
The problem was that when handling the request in the event listener, the provider (i.e. org.switchyard.Service) interface property is null.

I had worked around this for two way ops by setting the interface in the activity event when handling the response, but this bug was because it wasn't being handled for one-way ops. So the fix was to basically do the same workaround for one-way ops.
Comment 9 Keith Babo 2013-08-20 12:30:59 EDT
OK, provider will always be null in that scenario.  Happy to hear that you have a workaround from the rtgov side.  Let me know if you run into any other issues.
Comment 10 Jiri Pechanec 2013-09-16 05:23:06 EDT
Verified in ER2
Comment 14 JBoss JIRA Server 2014-07-02 05:19:48 EDT
Gary Brown <gary@brownuk.com> updated the status of jira RTGOV-248 to Closed

Note You need to log in before you can comment on or make changes to this bug.