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 » Java Plugin Node API - Retrieving name of messageflow

Post new topic  Reply to topic
 Java Plugin Node API - Retrieving name of messageflow « View previous topic :: View next topic » 
Author Message
jpm
PostPosted: Thu May 08, 2003 9:12 am    Post subject: Java Plugin Node API - Retrieving name of messageflow Reply with quote

Newbie

Joined: 23 Apr 2003
Posts: 6

Hi,

I have written a java plugin node that is used in several different flows. The plugin node writes logging info to a file.

I want to log the name of the flow that is using the node. For example, if the node is contained in

FLOW1.FLOW2.FLOW3.FLOW4.node

I want to log "FLOW1.FLOW2.FLOW3.FLOW4"

I tried MbMessageFlow.getName(), but this only returns the top level flowname i.e. "FLOW1"

Is it possible to obtain the full flow heirachy name ( as viewed in a trace)?

Thanks,
John
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 08, 2003 1:07 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you saying that you are calling your java node from the following:
Code:
Message Flow:  FLOW1
    SubFlow: FLOW2
        SubFlow: FLOW3
            SubFlow: FLOW4
                 javaNode


That's all "running" in FLOW1. Think of SubFlows as method calls. They're *really* contained WITHIN the main flow, they aren't called as separate execution units.
Back to top
View user's profile Send private message
Ian
PostPosted: Fri May 09, 2003 1:26 am    Post subject: Reply with quote

Disciple

Joined: 22 Nov 2002
Posts: 152
Location: London, UK

This analysis is correct, the concept of a subflow only exists in the Control Center.

When a messageflow is deployed to a broker all subflows are combined into the one messageflow and therefore the broker only has one messageflow which in the Control Center is represented by a main flow with a number of sub flows.

The best way to view this is by the fact that only the main messageflow is deployed and you don't have to deploy the sub flows seperately to the broker.
_________________
Regards, Ian
Back to top
View user's profile Send private message
jpm
PostPosted: Fri May 09, 2003 2:09 am    Post subject: Reply with quote

Newbie

Joined: 23 Apr 2003
Posts: 6

Jeff, Yes, that is what I mean. Sorry, I'm new to this.

The java plugin node is being called from a subflow, which can be called from various different subflows, hence

Code:
Message Flow:  FLOW1
    SubFlow: FLOW2
        SubFlow: FLOW3
            SubFlow: FLOW4
                 javaNode

Message Flow:  FLOW1
    SubFlow: FLOW8
        SubFlow: FLOW9
            SubFlow: FLOW10
                SubFlow: FLOW4
                    javaNode



Is it possible to obtain the name of the subflows, in between 'Message Flow : FLOW1' and 'SubFlow : FLOW4'? Thanks

Ian,
Thanks. What I am trying to do, is to obtain the name of the node as viewed in a user trace, which is in the form 'Flow1.Subflow2.SubFlow3.SubFlow4'. Is it possible to get this information from the Java API or an MQSI compute node?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri May 09, 2003 5:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The only way you could get what you want is to have each "subflow" populate a specific variable in the Environment that included it's name and have your java node read that. If you do this properly, you can create each name in the order of calling.

For instance, in your Flow2:
Code:
Set Environment.Variables.FlowNames.Index = Environment.Variables.FlowName.Index + 1;
Set Environment.Variables.FlowName.Names[Environment.Variables.FlowName.Index]='FLOW2';


Put the same code in each of your other subflows, changing the name being assigned, and when you get to your java node, you'll see an array where the names have been populated in order.

You could simplify it by using string concatenation instead of an array and an index.

But without doing something equivalent to the above, you can't do what you want. There is no "run-time" equivalent of a subflow as a real entity. It's equivalent to a procedure or method of the main flow.
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 » Java Plugin Node API - Retrieving name of messageflow
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.