ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reusable subflows returning values

Post new topic  Reply to topic
 Reusable subflows returning values « View previous topic :: View next topic » 
Author Message
eyes123
PostPosted: Thu Aug 06, 2009 3:29 am    Post subject: Reusable subflows returning values Reply with quote

Newbie

Joined: 06 Aug 2009
Posts: 3

Hi all,

Sorry if this has already been posted somewhere else but I cant find it using any combination of search terms which come to mind; however this doesn't feel like an unusual thing to be doing so it must have been considered before:

Whilst specifying a set of services recently, I've created subflows for some re-usable elements (some calling webservices, others just performing calculations based on specific inputs). Each of these can essentially be thought of as simple services using a request/response invocation pattern.

The issue I'm having is incorporating the responses from these back into the message flow.

The input message "A" has a large number of fields which need to be mapped to the evenual output "B" along with some other fields which are generated by the subflows.

As an example, subflow "SF1" has a simple interface requiring two variables: ID and channel (both found in message A), and resulting in an output message containing a secondary ID "SID". The input to SF1 is created in a mapping node and the message sent and executed accordingly.

I need a way of merging this SID along with the message A into a mapping node to create message B, which is constructed of fields from A and the SID field.

I've considered an aggregation node but I dont want this to happen in parrallel and from what I hear there are potential reasons not to use such a node. Advice if this is true and if there are alternatives would be appreciated.

I've also tried using an ordered flow, but the SID output gets lost when the first flow path is completed and I dont know of any way of getting it back to the flow order node. I also looked at writing to the LocalEnvironment (not useful for the reason above), and using ESQL variables but can't find any with a scope which wouldn't have unpredictable results with multiple theaded invocations of the service.

The final thing I considered is passing the inial message through the subflow in an "any" typed field so it can be accessed at the other end without compromising the encapsulation of the subflow from the calling service; however this feels really untidy, unclean and frankly just wrong.

If anyone could give advise I'd appreciate it.

Regards,

James
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Aug 06, 2009 4:21 am    Post subject: Re: Reusable subflows returning values Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

eyes123 wrote:

I've considered an aggregation node but I dont want this to happen in parrallel and from what I hear there are potential reasons not to use such a node.

What reasons are you referring to?

Quote:

I've also tried using an ordered flow, but the SID output gets lost when the first flow path is completed and I dont know of any way of getting it back to the flow order node. I also looked at writing to the LocalEnvironment (not useful for the reason above),


How about using the (global) Environment rather than the LocalEnvironment?
Back to top
View user's profile Send private message
eyes123
PostPosted: Thu Aug 06, 2009 5:45 am    Post subject: Reply with quote

Newbie

Joined: 06 Aug 2009
Posts: 3

Spot on thanks. Not 100% sure the issues my collegue was refering to with regard to the aggregation (it's actually him doing the work, I'm just a "not enough of an expert, expert" he's calling on).

With regard of the Environment I can access that from a compute node, is there any way to access it from a Mapping node?

Thanks again.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Aug 06, 2009 6:12 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

I'm not a big fan of the mapping node so I wont offer too much advice here.... but if the worst comes to the worst you can use a compute node (working on the local env only, ie not the message) to move it from the environment to the localEnvironment ready for you mapping node or even just do the mapping in the compute node.

I Admit it may be a little crude.... Other thoughts welcome
Back to top
View user's profile Send private message
eyes123
PostPosted: Thu Aug 06, 2009 6:47 am    Post subject: Reply with quote

Newbie

Joined: 06 Aug 2009
Posts: 3

I must admit I'm not a huge fan but in terms of maintainability it has some advantages, and either way the decision is out of my hands on this project.

I had the same thought regarding a compute node, but the issue I have is that even for things in the local environment the build time error detection fails find local environment variables, as they're created at run time. Therefore you can't deploy it. I don't know of a way to define LocalEnvironment.Variable definitions in advance, or to turn off strict error checking on the mapping node mappings.

In the mean time I've suggested mapping the majority and then doing a subsequent compute node to fill in the blanks. It's about as untidy as the other way round so any improvements would be welcome
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reusable subflows returning values
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.