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 » Propagate to label from JavaCompute node

Post new topic  Reply to topic
 Propagate to label from JavaCompute node « View previous topic :: View next topic » 
Author Message
aceninja
PostPosted: Wed Feb 14, 2024 8:08 am    Post subject: Propagate to label from JavaCompute node Reply with quote

Newbie

Joined: 09 Jan 2024
Posts: 4

Hello, using ACE12, i would like to do a 'PROPAGATE TO LABEL' to a label node from within a JavaCompute node. Is this possible?

Couldn't find any documentation about this. There are some very old threads about this but I'm sure they contain outdated information.

Would really appreciate any help, thanks!
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Feb 15, 2024 2:02 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi aceninja.

Yes this is possible in a Java Compute Node in any version of the product. You have to call the getAllRoutes() or the getRoute() method on the MbNode class to get an MbRoute object which represents a label node with a specific name. Once you have the MbRoute object you want, you call the propagate() method on it.

Here are some doc links to get you started.

The MbNode object: https://www.ibm.com/docs/api/v1/content/SSTTDS_12.0/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbNode.html

The MbRoute object: https://www.ibm.com/docs/api/v1/content/SSTTDS_12.0/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbNode.html

The MbNodeInterface object to get started creating a Java Compute Node: https://www.ibm.com/docs/api/v1/content/SSTTDS_12.0/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbNodeInterface.html


I hope this helps.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
aceninja
PostPosted: Thu Feb 15, 2024 5:11 am    Post subject: Reply with quote

Newbie

Joined: 09 Jan 2024
Posts: 4

Thanks a lot mgk!

I didn't know it was that simple. My problem is solved using the following within the evaluate method of an MbJavaComputeNode:

Code:
this.getRoute("Label_Name").propagate(outAssembly);


Very much appreciate the quick response, thanks again!
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Feb 15, 2024 5:51 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi aceninja

I glad this helped solve your problem.

However, I would recommend checking that the MbRoute object is not null before calling propagate() on it.

The label node may exist now in your flow, but if someone changed the label name in the future without changing your code or reused your code in a different flow that did not have the label node then you would get a null pointer exception rather than a more useful error message of your creation

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Propagate to label from JavaCompute node
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.