Author |
Message
|
pcelari |
Posted: Mon Aug 07, 2006 4:19 pm Post subject: How to pause in a node? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Another newbie question.
In my current applications, I use a field in the queue to set a delay, in seconds, after retrieving a msg from a queue, but before start processing it.
How can I do the same in a msgflow?
it must be simple to do.
thanks a lot for any input. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
wschutz |
Posted: Mon Aug 07, 2006 4:40 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
pcelari |
Posted: Tue Aug 08, 2006 4:51 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
thanks for the link, Wayne.
I thought using timer nodes for such trivial function would be too much of an overkill, there must be simpler way of doing this.
Now it seems to make sense to use it.
-Paul _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 08, 2006 5:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's not a trivial function.
It's also a very strange requirement, to have to wait before processing an MQ message. Why not wait before sending it in the first place? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jbanoop |
Posted: Tue Aug 08, 2006 7:20 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
you could write somthing on the lines of a delay loop or somthing (reminds me of micro processors lab) or you could try having a java compute node (in v 6 ) that would maybe call Thread.Sleep() or somthing on that lines ..
I would be curious to know the business compulsions for such a requirement ..
Anoop |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 08, 2006 7:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jbanoop wrote: |
you could write somthing on the lines of a delay loop or somthing (reminds me of micro processors lab) or you could try having a java compute node (in v 6 ) that would maybe call Thread.Sleep() or somthing on that lines ..
I would be curious to know the business compulsions for such a requirement ..
Anoop |
The delay loop idea will cause your execution group to hang.
Thread.Sleep() might not.
The Timer node is the best solution. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 08, 2006 7:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sorry for the duplicate. _________________ I am *not* the model of the modern major general.
Last edited by jefflowrey on Wed Aug 09, 2006 6:12 pm; edited 1 time in total |
|
Back to top |
|
 |
iceage |
Posted: Wed Aug 09, 2006 6:03 pm Post subject: |
|
|
 Acolyte
Joined: 12 Apr 2006 Posts: 68
|
You shouldnt try to "delay" / "Sleep" / "Pause" at the Broker , its a messaging hogging engine by design & purpose .. Dont slow it down !!! |
|
Back to top |
|
 |
pcelari |
Posted: Mon Aug 14, 2006 4:29 pm Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
sorry replying back late. I was away for a few days.
the reason for my delay is:
A query request msg arrives, I transform it to a format for mainframe CICS to generate a record in UDB. As it may take time, and has relatively low priority, I wait 5 seconds before sending the same request in a different XML format to a webservice to retrieve the generated record.
Currently, I use a simple C program to do this, pretty straightforward.
But using WBIMB, I expect to find an even easier way to pause.
thanks for all the inputs. You're right, the trivial in one place may not be trivial in another environment. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 14, 2006 5:43 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Have CICS return you a reply that says it processed or not.
If you don't get it in five seconds, send the request the other way.
You can use Aggregation for only one request. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Tue Aug 15, 2006 4:19 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
No, the CICS only generate the record. it doesn't reply.
That's why the second route is needed to retrieve the result, upon receiving the XML query msg, the webservice queries the UDB and returns the result as an XML msg. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
pcelari |
Posted: Tue Aug 15, 2006 4:27 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
BTW, this mechanism works fine as it's already in production for quite some time. The delay is run-time configurable as it is set in EnvData field in the queue, 5 seconds is currently being used. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 15, 2006 4:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Ah, I thought the second route was a redundant path to send the request, not the path to receive the reply.
You mean EnvData on the process definition?
You won't be able to get that without a PCF Inquire Queue command from broker. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Tue Aug 15, 2006 4:38 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Oops, you're right. EnvData in the process definition for the triggering.
the triggered C program sends the msg to CICS, wait EnvData seconds, and sends the otherwise transformed XML msg to queue destined to a webservice, and get the resultset back.
I wonder if there is a function within ESQL that can do the delay. It can't be that difficult. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 15, 2006 4:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pcelari wrote: |
It can't be that difficult. |
Oh yes it can.....
Is it possible to put a trigger on the UDB so that when the CICS writes the result row, the result is sent to a new flow for processing?
Failing that, I think you're best off with a Timer node as previously suggested. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|