|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Need to assign Different Current Time Stamp in a compute |
« View previous topic :: View next topic » |
Author |
Message
|
sankritya |
Posted: Tue Apr 28, 2009 12:04 am Post subject: Need to assign Different Current Time Stamp in a compute |
|
|
Centurion
Joined: 14 Feb 2008 Posts: 100
|
Hi All,
In a flow with structure
SOAP INPUT -> Compute1 -> SOAP Request -> Compute2
In the Compute1 I am creating a message for invoking a Web Service using SOAP Request and storing the Time of Request as CURRENT_TIMESTAMP. WebService needs to be invoked multiple times so I have used the WHILE loop for multiple Requests. Code is Like this
WHILE LASTMOVE(refRecordSet) DO
CREATE LASTCHILD OF Environment.Variables.ABC NAME 'XYZ' ;
DECLARE refToStoredTimeInfo REFERENCE TO Environment.Variables.ABC.XYZ[<];
SET refToStoredTimeInfo.Time_IN = CURRENT_TIMESTAMP ;
PROPAGATE TO TERMINAL 'out';
--Move Reference to Next Sibling
MOVE refRecordSet NEXTSIBLING REPEAT TYPE NAME;
END WHILE;
Now if refRecordSet has 5 entries then WebService is Requested 5 Times and Timestamp is recorded 5 Times in the Environment. Though I am getting all the 5 entries for timestamp but they all have the same value , even if I run the flow in debugger and request the web service after a considerable delay.
How can I get the actual Timestamps when the Request was made.I do not want to add an extra compute node as it will be a burden to the performance.
Toolkit 6.1.0.3
Broker version :6 fp3 |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 28, 2009 12:12 am Post subject: Re: Need to assign Different Current Time Stamp in a compute |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sankritya wrote: |
How can I get the actual Timestamps when the Request was made.I do not want to add an extra compute node as it will be a burden to the performance. |
You don't. If you'd looked here you'd have noticed that:
Quote: |
All calls to CURRENT_TIMESTAMP within the processing of one node are guaranteed to return the same value. |
Redesign time.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Apr 28, 2009 2:06 am Post subject: Re: Need to assign Different Current Time Stamp in a compute |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
sankritya wrote: |
How can I get the actual Timestamps when the Request was made? |
There are a few possible options:- Create a java method that can return the current time in a suitable form, and call that from the ESQL
- Or, create a C custom node to return the current time in a suitable form
- Or, add an extra Compute node, (or Database node, or Filter node)
The last option is probably the most reasonable one.
sankritya wrote: |
I do not want to add an extra compute node as it will be a burden to the performance. |
Really? How much of a burden to performance would it be? Please explain. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 28, 2009 2:10 am Post subject: Re: Need to assign Different Current Time Stamp in a compute |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rekarm01 wrote: |
Create a java method that can return the current time in a suitable form, and call that from the ESQL |
Or use a Java Compute Node _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|