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 » Passing Environment from a flow to another

Post new topic  Reply to topic
 Passing Environment from a flow to another « View previous topic :: View next topic » 
Author Message
jsanchose
PostPosted: Tue May 09, 2006 6:45 am    Post subject: Passing Environment from a flow to another Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

Hi.

I'm using SWIFT_2005_050615 message set.

I've this schema:

Queue1 --> SpecificFlow --> Queue2

Queue2 --> CommonFlow --> Queue3 --> MQSA --> SAA --> SWIFTNet

I've a specific flow for each MTxxx message and only one common flow for validation and other common treatments.

SpecificFlow sets Environment variables and I need to pass them to CommonFlow.

is it possible?.

using MQRFH2?

...or I must to store Environment variables in OutputRoot.

Thanks.
Back to top
View user's profile Send private message
madi
PostPosted: Tue May 09, 2006 6:56 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

can you eliminate Queue2 and just have a subflow??

--madi
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue May 09, 2006 6:58 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I assume the message in queue2 is in swift format. If it were me, I'd stroe your specific variables in the usr folder of MQRFH2 to pass from flow 1 to flow 2.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jsanchose
PostPosted: Tue May 09, 2006 7:47 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

madi, I've 51 specific flows and only one common flow, if I change CommonFlow by a SubFlow, the SubFlow will be replicated 51 times.

I win independence having a separated common flow.

wschutz, yes, the MessageType is SwiftEnvelope and I'm trying with MQRFH2.usr, but this field is stored after MRM field causing an Exception in MQOutput node.

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 09, 2006 7:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Fields in the message on the queue are written out in the order they are created in the ESQL.

So if your message does not already have an MQRFH2, and you want to add one, you will need to create a new MQRFH2 header and you will need to do it BEFORE you assign anything to OutputRoot.MRM.

Maybe you want to use the Broker Domain Data Store (cache) nodes instead.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
madi
PostPosted: Tue May 09, 2006 8:11 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Quote:
, the SubFlow will be replicated 51 times.


i think that is exactly why u need a subflow

may be im not getting something ...... just so you know ...a subflow will just be one node representing the whole "SubFlow" which you can use anywhere you want

the changes you make to the actual subflow will apply to all your 51 subflow nodes.

do some reading on subflows and u will know what i mean .... having a seperate queue just for that reason doesn't make sense!!

jus try replacing the MQInput node with Input node(in your "Subflow") and right click where you want to add the subflow .. then say add subflow and then select your "Subflow"


--madi
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 09, 2006 8:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

madi wrote:
the changes you make to the actual subflow will apply to all your 51 subflow nodes.

The changes you make in a subflow will only be reflected in the flows that you re-deploy. So in order to propagate changes to all 51 inclusions of the subflow, jsanchose will have to redeploy all 51 specificFlows.

This isn't necessarily a bad thing, but it should be kept in mind.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jsanchose
PostPosted: Tue May 09, 2006 8:51 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

madi, subflow would be a valid solution but I prefer a separated flow for some reasons:

- Maintenance of Common flow is responsability of Infrastructure Support Group.

- Development of Specific flows is reponsability of many application programmers.

I want independence.

jefflowrey, your solutcion is good.

Here ESQL lines.

After CopyMessageHeaders, MQRFH2 is created.

-- Copiamos las cabeceras MQMD
CALL CopyMessageHeaders();

-- Escribimos un campo dummy para crear MQRFH2.usr que al final sera borrado.
SET OutputRoot.MQRFH2.usr.DUMMYFIELD = 'nothing';

...many, many lines of ESQL.

At end Environment is assigned and DUMMYFIELD is deleted.

/* Guardamos las variables de entorno en MQRFH2 para pasarselas
al flujo comun de envio a SWIFT, despues de esto borramos el campo
ficticio DUMMYFIELD que habiamos escrito para que MQRFH2 este entre
MQMD y MRM. */
SET OutputRoot.MQRFH2.usr.VARIABLES = Environment.Variables;
DELETE FIELD OutputRoot.MQRFH2.usr.DUMMYFIELD;

-- Salida del modulo por la pata de OUT.
RETURN TRUE;

END;


Thanks everybody.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 09, 2006 8:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You cannot just create an RFH2 header without changing some of the attributes:
On the MQMD.Format you have to set the correct value for RFH2 header. The value you just overwrote there needs to go into the format field of the RFH2 header etc...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Passing Environment from a flow to another
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.