Author |
Message
|
Bartez75 |
Posted: Thu Oct 15, 2009 1:42 am Post subject: Where to store data information so it is available in flows? |
|
|
 Voyager
Joined: 26 Oct 2006 Posts: 80 Location: Poland, Wroclaw
|
Hi,
I need to pass through a number of flows a flag (let say it can have value 'case1' or 'case'2 or 'case3'). Flow1 sends msg to flow2 and this sends it to flow3
So flow1 will set this flag and then in the other flows I should be able to read it.
One solution is database.
Other is to store it in the MQMD.ApplIdentityData in the message.
Is it ok to use header for it?
I can't use data part of the message for it (no changes in the message format)
Any other proposition are very welcome. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Oct 15, 2009 1:58 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
You can add these to your list
- RFH2 Header
- Shared ESQL Variable if the flowa re certain to be in the same Execution group.
As an observation, this on the surface seems awfully clumsy unless there is a lot more to it. Can everything be done in one flow or is that being too simplistic?
From the options, I'd probably opt for the RFH2 Header, specifically the 'usr' section _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Oct 15, 2009 2:01 am Post subject: Re: Where to store data information so it is available in fl |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Bartez75 wrote: |
One solution is database.
|
Yes this would work but has the overhead of needing a DB and you have to consider DB unavailability.
Quote: |
Other is to store it in the MQMD.ApplIdentityData in the message.
Is it ok to use header for it?
|
I wouldnt use this field for storing this data. Its not what it was created for!
Quote: |
Any other proposition are very welcome. |
Create a field in the MQRFH2.usr folder to store this flag. This folder is exists to hold user defined data like the flag you are talking about. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Oct 15, 2009 4:28 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
If you are using MQ 7, you could use Message Properties. I'm assuming WMB can access MQ 7 Message Properties, not sure.
Another option, maybe not the best one, is to use a MQ Queue to hold this data and use the MQGet node in your flows. This assumes of course that the flows are all on the same Broker. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Bartez75 |
Posted: Fri Oct 16, 2009 2:24 am Post subject: |
|
|
 Voyager
Joined: 26 Oct 2006 Posts: 80 Location: Poland, Wroclaw
|
I have used MQRFH2 header and usr folder for storing my flag ("PhaseNumber")
Here is a Root from trace (without data):
Code: |
Root: (
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2009-10-16 10:13:15.250'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 2
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'P10.QL.G.D.ODIN.IO.TOGENPDF.SIR'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 2
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51205742524b365f44454641554cd25e8d4a20032733'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'MVW0 '
(0x03000000):UserIdentifier = 'Integration '
(0x03000000):AccountingToken = X'16010515000000833d2b46cb61395e828ba628eb03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = '\Broker\rfhutil\rfhutilc.exe'
(0x03000000):PutDate = DATE '2009-10-16'
(0x03000000):PutTime = GMTTIME '10:13:15.250'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):usr = (
(0x03000000):PhaseNumber = '1'
(0x02000000): = ''
)
)
|
it works which means that I can read it from next flow but I have a question about behaviour of rfhutil application.
When I browse that mesasge with rfhutil on the tab usr there is no data. It is empty. Not sure why... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 16, 2009 9:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Bartez75 wrote: |
it works which means that I can read it from next flow but I have a question about behaviour of rfhutil application.
When I browse that mesasge with rfhutil on the tab usr there is no data. It is empty. Not sure why... |
Did you set the property value pair like JMS would?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Bartez75 |
Posted: Mon Oct 19, 2009 4:29 am Post subject: |
|
|
 Voyager
Joined: 26 Oct 2006 Posts: 80 Location: Poland, Wroclaw
|
As you can see in this trace I have created usr element that contains my custom element PhaseNumber with value '1'.
One thing is that folder usr has also an extra element (0x02000000): = '' (not sure why).
Is it normal?
I think I'm creating RFH2 header as it should be done but maybe something wrong there.
Can you say anything when looking at the structure of this header from that trace? |
|
Back to top |
|
 |
Bartez75 |
Posted: Mon Oct 19, 2009 4:52 am Post subject: |
|
|
 Voyager
Joined: 26 Oct 2006 Posts: 80 Location: Poland, Wroclaw
|
Update on this:
I have just fixed it. Now usr folder has only "my" element PhaseNumber (no extra empty element) and I can see it in rfhutil program.
I'm doing it in java and I used wrong Filed Index when creating last child element. I used TYPE_NAME_VALUE and now I'm using TYPE_NAME. |
|
Back to top |
|
 |
sirsi |
Posted: Thu Oct 22, 2009 3:27 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
smdavies99
Quote: |
Shared ESQL Variable if the flowa re certain to be in the same Execution group. |
Arent shared vaiable's scope is within the individual flow? I dont think we can share a variable across different flows(even if they exist within same execution group)... correct me if I am wrong... |
|
Back to top |
|
 |
Bartez75 |
Posted: Thu Oct 22, 2009 4:09 am Post subject: |
|
|
 Voyager
Joined: 26 Oct 2006 Posts: 80 Location: Poland, Wroclaw
|
yes, at least I only used shared variables in one flow. They are for sure shared between instances of the same flow. |
|
Back to top |
|
 |
Bravo |
Posted: Tue Jan 05, 2010 1:16 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Are SHARED variables can be used in sub flow? I have declared and assigned value for SHARED variable in Main flow, trying to access in subflow but its returning NULL. _________________ Bravo |
|
Back to top |
|
 |
edasnarik |
Posted: Wed Jan 06, 2010 3:57 am Post subject: |
|
|
Acolyte
Joined: 10 Mar 2009 Posts: 61
|
How about using MQGet Node to retrieve and place the state info in some queue |
|
Back to top |
|
 |
goffinf |
Posted: Wed Jan 06, 2010 10:51 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
|
Back to top |
|
 |
Bravo |
Posted: Fri Jan 08, 2010 11:01 am Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Moved the Main flow and sub flow under same schema and it worked. _________________ Bravo |
|
Back to top |
|
 |
|