Bug 976673 - There is no straightforward way how to return a reply from Rules component
There is no straightforward way how to return a reply from Rules component
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity medium
: ER1
: ---
Assigned To: David Ward
Jiri Pechanec
Depends On:
  Show dependency treegraph
Reported: 2013-06-21 03:31 EDT by Jiri Pechanec
Modified: 2014-06-16 19:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Enhancement
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-1554 Critical Closed Add fault mapping to bpm and rules 2014-06-18 11:08:18 EDT

  None (edit)
Description Jiri Pechanec 2013-06-21 03:31:24 EDT
It is not possible to create a reply and return it from Rules component in a straightforward manner. The output mapping does not take neither the working memory nor the global parameters into consideration.

The best approach now is to import the "message" as global variable and setContent on it, but it would be better to allow to return just a payload of the message without using the Message object.
Comment 1 Keith Babo 2013-06-21 07:56:08 EDT
I agree it would be nice to be more flexible and we're open to ideas on how to do this outside the Message object.  The current support in rules component allows for modification of the inserted message (e.g. policy.setApproved(true)) or assignment of different content via the Message variable.  Introducing a new mechanism to handle returning output from any object in working memory or an object created in the RHS of the rule would be an enhancement and we are open to ideas. :-)

Assigning to David to get his feedback as well.
Comment 2 David Ward 2013-06-24 06:59:13 EDT
I've introduced a way to do this in https://issues.jboss.org/browse/SWITCHYARD-1554 .  Please read my extensive Comment there, particularly point #4 near the bottom.  ;)
Comment 3 Jiri Pechanec 2013-09-19 08:17:57 EDT
Verified in ER2
Comment 7 JBoss JIRA Server 2014-06-16 19:52:43 EDT
Keith Babo <kbabo@redhat.com> updated the status of jira SWITCHYARD-1554 to Closed

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