How to delay few seconds in BusinessProcess custom code
Hi Community,
Here we have requirement to process messages min 10 sec delay. Current time it is taking my businessProcess is less than 1 sec.
To implement this requirement , I need to sleep 10 sec in business process custom code.
Could somebody help me to implement delay in BusinessProcess.
Thanks,
Prashanth
Comments
<delay duration='"PT10S"'/>
In BPL use delay:
<delay duration='"PT10S"'/>In Custom Code BP check MakeTimerCall and make something similar.
could you give me object script code snippet for wait /sleep for given seconds.
because same code i want to use wherever i need to wait intentionally
Thanks,
Prashanth
in object script the command is HANG 10 to wait for 10 sec
The issue is it would actually hang the process for 10 seconds. MakeTimerCall implementation would not - BP could process other messages in the meantime.
@Eduard Lebedyuk
Could you please show me how to code the MakeTimerCall in the custom code in BP. I am having similar issue. Any help is appreciated.
To wait for 15 seconds:
SettSC=..SetTimer("PT15S")Can you try this
Set tSC = ..SetTimer("PT25S")
Should i just copy this code block
method OnErroredResponse(pErroredResponseStatus As %Status, request As %Library.Persistent, ByRef response As %Library.Persistent, pCompletionKey As %String) as %Status
or should I rename it, also how to invoke this method. I could not find any sample code