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 » My function repository

Post new topic  Reply to topic Goto page 1, 2  Next
 My function repository « View previous topic :: View next topic » 
Author Message
KoGor
PostPosted: Tue Dec 20, 2011 6:38 am    Post subject: My function repository Reply with quote

Voyager

Joined: 09 Nov 2005
Posts: 81
Location: Moscow,Russia.

Hi All!
I want to create my function repository and invoke functions and procedures from different message flows from this file. I created simple project and put there functions.esql with my functions. Then I added this project to message flow property "Project References" as reference. But WMB do not see my functions inside this message flow. What I did wrong? Could you help me with direction? I couldn't find anything in info center about creating myself function repository. May be it is called differently...
Thank you in advance!
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 20, 2011 6:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Did you clean all the projects involved?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
paintpot
PostPosted: Tue Dec 20, 2011 7:15 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

Back to top
View user's profile Send private message
KoGor
PostPosted: Tue Dec 20, 2011 7:15 am    Post subject: Reply with quote

Voyager

Joined: 09 Nov 2005
Posts: 81
Location: Moscow,Russia.

Yes. Must I create Message Flow project or it can be General Project?
Back to top
View user's profile Send private message
paintpot
PostPosted: Tue Dec 20, 2011 7:16 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

ok - let's try that again.

use build/rebuild too

In your esql file, use the PATH clause to refer to the path to your functions

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ak05105_.htm
Back to top
View user's profile Send private message
paintpot
PostPosted: Tue Dec 20, 2011 7:18 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

KoGor wrote:
Yes. Must I create Message Flow project or it can be General Project?


Message flow project
Back to top
View user's profile Send private message
KoGor
PostPosted: Tue Dec 20, 2011 7:23 am    Post subject: Reply with quote

Voyager

Joined: 09 Nov 2005
Posts: 81
Location: Moscow,Russia.

Got it. I created Message flow project and it works now!
Thank you!
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Dec 20, 2011 7:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

It seems this file would grow unbearably large over time. Most people use a source code repository to store their functions. Inside this repository, people sometimes create a common flows project, where reuse can occur.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Dec 20, 2011 7:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lancelotlinc wrote:
It seems this file would grow unbearably large over time. Most people use a source code repository to store their functions. Inside this repository, people sometimes create a common flows project, where reuse can occur.


Ok, I'll bite, it's Xmas.

Given that the OP is clearly attempting a common flows project (which at the moment only seems to contain ESQL but the utility of storing common flow objects as well will occur at any moment), and like all code this should be stored within a properly managed source code repository what's file size got to do with anything?? Are you proposing some kind of dynamic repository from which code is incorporated on an as-needed basis hence only the actual code is incorporated? How would (or do) you work that?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Dec 20, 2011 8:13 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

No, not that. The way the OP words the original post, it seems like he is putting all his common functions into one file, then referring to this common file from many message flows.

Quote:
I want to create my function repository and invoke [many] functions and [many] procedures from different message flows from this [one] file.


It seems to me the [one] file with [many] functions and [many] procedures would grow too large to be of use.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
paintpot
PostPosted: Tue Dec 20, 2011 8:17 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

lancelotlinc wrote:
It seems to me the [one] file with [many] functions and [many] procedures would grow too large to be of use.


and then you can refactor
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Dec 20, 2011 8:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Great idea. Good for job security.

I REALLY like IBM's approach in WMB toolkit, using namespaces, for both ESQL code as well and message flows.

Thinking about what could be the motivation of the OP, it could be that he is uncomfortable with using namespaces (package names).
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Dec 20, 2011 8:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lancelotlinc wrote:
No, not that. The way the OP words the original post, it seems like he is putting all his common functions into one file, then referring to this common file from many message flows.


I took that meaning as well.

lancelotlinc wrote:
It seems to me the [one] file with [many] functions and [many] procedures would grow too large to be of use.


Ok, I see where you're going here.

While I can accept the point, I think you need to draw a distinction between common functions (usable in multiple projects) and common functions (usable by a number of like-minded business functions). IHMO your design needs to draw this distinction and ensure that any common project (in the context of this post) really does contain truly common functions & isn't just a dumping ground for any old functions that's called from 2 flows. This is a procedural, code review point. In the same way you'd review any new "project specific" function to ensure it's not covered by an existing common function, or can be covered by such a function with a little harmless editing.

My experience is that the number of actual common functions (as distinct from functions used in multiple locations by a single project) is manageably small.

lancelotlinc wrote:
Thinking about what could be the motivation of the OP, it could be that he is uncomfortable with using namespaces (package names).


Or doesn't want to add them to a Java-free environment.

This is a line. At one end there's every function in a file by itself. At the other end is a single file with every possible function in it. At what point on the line you settle is one of those questions with no right answer, just an answer that's right for you taking all of your circumstances into consideration.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
KoGor
PostPosted: Tue Dec 20, 2011 10:42 pm    Post subject: Reply with quote

Voyager

Joined: 09 Nov 2005
Posts: 81
Location: Moscow,Russia.

Hi guys! Thank you for your posts. But I didn't get all what you said actually

lancelotlinc wrote:
No, not that. The way the OP words the original post, it seems like he is putting all his common functions into one file, then referring to this common file from many message flows.


Yep, that's right. I just want to create a reusable list of common functions. And then call them from different message flows. Is it a wicked way to do it? I added broker schema and call the full name function from message flow , it makes more readable code for me and I never mix up functions from repository with local functions.
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Wed Dec 21, 2011 4:48 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

No. It is not a bad thing at all.

You just need to manage it the same way you would any shared code for common functions . Don't let it grow too large or become a dumping ground for stuff that is not really reusable and refactor appropriately to your business and environment if required.

Depending on your broker version the whole broker schema maybe built into your individual flow bar files so be ware of that for your version if it does get very large. Otherwise - It is a good thing .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » My function repository
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.