Topic
  • 8 replies
  • Latest Post - ‏2013-07-18T08:16:55Z by kimbert@uk.ibm.com
O4BO
O4BO
8 Posts

Pinned topic Can Java Compute Node change properties of subsequent nodes

‏2013-04-22T00:05:18Z |

The Message Broker Java API appears to only be useful on or about the Generate Pattern event, 

I specifically want to change the Queue Manager and Queue name on an MQ Output node with my JavaCompute node.

Ollie

  • fjb_saper
    fjb_saper
    125 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-04-30T16:01:15Z  

    Read up in the infocenter. The information on how to do that in a dynamic way is all in there. It is no different in JAVA or ESQL....

    Have fun

  • O4BO
    O4BO
    8 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-04-30T20:19:59Z  
    • fjb_saper
    • ‏2013-04-30T16:01:15Z

    Read up in the infocenter. The information on how to do that in a dynamic way is all in there. It is no different in JAVA or ESQL....

    Have fun

    fjb, that like someone asking what time it is, and your answer is to say you can buy a watch.  The answer, no thanks to you, is "some nodes can have their properties manipulated and some cannot. http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac16840_.htm ESQL and Java do NOT have the same capabilities according to the chart see "not possible"

    For example you cannot as far as I can tell, change the Queue Name of an MQOutput node from either ESQL or Java which is the specific property I wanted to change.

     

  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    515 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-05-03T14:34:39Z  
    • O4BO
    • ‏2013-04-30T20:19:59Z

    fjb, that like someone asking what time it is, and your answer is to say you can buy a watch.  The answer, no thanks to you, is "some nodes can have their properties manipulated and some cannot. http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac16840_.htm ESQL and Java do NOT have the same capabilities according to the chart see "not possible"

    For example you cannot as far as I can tell, change the Queue Name of an MQOutput node from either ESQL or Java which is the specific property I wanted to change.

     

    It can be done - but you don't do it by manipulating the node property. I expect you need to set a field in the MQ header in OutputRoot or something like that.

    btw, I don't agree with this statement: "The Message Broker Java API appears to only be useful on or about the Generate Pattern event". The JavaCompute node can do almost anything that a Compute node can do, and it uses the Java API. Feel free to clarify what you meant if it still matters and you want a better answer.

  • fjb_saper
    fjb_saper
    125 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-05-20T12:50:16Z  

    @OBO .. If it still matters... The MQOutput node should be set to Destination list and the Destination needs to be put into the local Environment. 

    For the rest I agree with Kimbert.

  • MKJT_Michael_Oliver
    MKJT_Michael_Oliver
    2 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-07-16T02:22:38Z  
    • fjb_saper
    • ‏2013-05-20T12:50:16Z

    @OBO .. If it still matters... The MQOutput node should be set to Destination list and the Destination needs to be put into the local Environment. 

    For the rest I agree with Kimbert.

    fjb and kimbert, yes the destination list is the way to change the queue name for the output node, thanks.  What remains and my local IBM support can't answer and I have yet to find the infocenter explanation on how, is to have an ESQL script  in a subsequent ComputeNode modified so when the message gets to that node it executes the new ESQL.

    Can an ESQL script be stored in the database, retrieved in Node A (either DB node or JavaCompute) and the ComputeNode B have its ESQL updated by that ESQL script retrieved from the database and executed when it gets to B?

    As for Java vs ESQL Yes I agree "almost" and I was referring to setting properties and that's where the difference I was, not meant outside that scope.

  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    515 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-07-17T07:52:13Z  

    fjb and kimbert, yes the destination list is the way to change the queue name for the output node, thanks.  What remains and my local IBM support can't answer and I have yet to find the infocenter explanation on how, is to have an ESQL script  in a subsequent ComputeNode modified so when the message gets to that node it executes the new ESQL.

    Can an ESQL script be stored in the database, retrieved in Node A (either DB node or JavaCompute) and the ComputeNode B have its ESQL updated by that ESQL script retrieved from the database and executed when it gets to B?

    As for Java vs ESQL Yes I agree "almost" and I was referring to setting properties and that's where the difference I was, not meant outside that scope.

    MKJT_Michael_Oliver: I assume you are the same person as O4BO who started this thread? Do you have two identities on DeveloperWorks?

    ESQL cannot be loaded dynamically from a database. ESQL is not XSLT - it is source code, and it needs to be compiled before use. ESQL does have the 'EVAL' statement but it should be used sparingly because it is very inefficient compared to normally-deployed ESQL. In any case, source code that is loadable in this way is very hard to test thoroughly. That's not a good characteristic when we're talking about business integration apps.

    I suspect that there is a better way to accomplish your goals - if you explain what your message flow needs to do then we may be able to offer advice that is more useful / constructive.

     

     

     

  • MKJT_Michael_Oliver
    MKJT_Michael_Oliver
    2 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-07-17T23:27:45Z  

    MKJT_Michael_Oliver: I assume you are the same person as O4BO who started this thread? Do you have two identities on DeveloperWorks?

    ESQL cannot be loaded dynamically from a database. ESQL is not XSLT - it is source code, and it needs to be compiled before use. ESQL does have the 'EVAL' statement but it should be used sparingly because it is very inefficient compared to normally-deployed ESQL. In any case, source code that is loadable in this way is very hard to test thoroughly. That's not a good characteristic when we're talking about business integration apps.

    I suspect that there is a better way to accomplish your goals - if you explain what your message flow needs to do then we may be able to offer advice that is more useful / constructive.

     

     

     

    Yes I have two logins, two jobs two different companies, can't remember which is which sometimes, sorry if it confused.

    Ok good to know and makes sense.  

    Without going into too much proprietary details, we are trying to create a dynamic data driven orchestration engine that runs in WMB to take incoming events, lookup rules and execute those rules to orchestrate the application flow.  We know we can use scripting and java classes dynamically and we wanted to store the esql script in a scriptbody field in the database and match those up and execute them in the flow.

    It was proving difficult to employ esql from java and the local IBM techie suggested callStatement but we couldn't get that to work unless the esql was just a sql statement.

    In a way this is actually better.  We can take any esql that is needed, slap it into a flow of its own with MQ input and output and call it as an atomic service with all the protection of the compilation and debugging, so overall a better sollution anyway.  

    Thanks.

    MO, Ollie, O4BO

     

  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    515 Posts

    Re: Can Java Compute Node change properties of subsequent nodes

    ‏2013-07-18T08:16:55Z  

    Yes I have two logins, two jobs two different companies, can't remember which is which sometimes, sorry if it confused.

    Ok good to know and makes sense.  

    Without going into too much proprietary details, we are trying to create a dynamic data driven orchestration engine that runs in WMB to take incoming events, lookup rules and execute those rules to orchestrate the application flow.  We know we can use scripting and java classes dynamically and we wanted to store the esql script in a scriptbody field in the database and match those up and execute them in the flow.

    It was proving difficult to employ esql from java and the local IBM techie suggested callStatement but we couldn't get that to work unless the esql was just a sql statement.

    In a way this is actually better.  We can take any esql that is needed, slap it into a flow of its own with MQ input and output and call it as an atomic service with all the protection of the compilation and debugging, so overall a better sollution anyway.  

    Thanks.

    MO, Ollie, O4BO

     

    Right - I wondered whether that was the goal. I agree that statically compiled code is a far better ( and more governable ) solution.

    You don't have to put the ESQL into its own flow, though. That might incur extra transactional and I/O costs when you move the MQ messages from one queue to another ( depends on whether the messages are persistent and how you have set the transaction properties for the flow ). Message flows + ESQL/Java provide a rich language for expressing conditional logic - you are not limited to using an entire flow as your unit of function. You could use RouteToLabel nodes, IF...ELSE in ESQL, switch...case in a JavaCompute...the list goes on.