[progress Communities] [progress Openedge Abl] Forum Post: Re: Can I Set Trigger Delay Time...

  • Thread starter Thread starter Shiva Duriseati
  • Start date Start date
Status
Not open for further replies.
S

Shiva Duriseati

Guest
Hi Kasipet, Thank you for clarification. In my earlier post cutoffTimeStamp method increase the execution time of the trigger. So it works when you have remote calls which takes long time in custom trigger.(Its not suitable for your current requirement) Since your response(REST createRecord) is delayed before execution of trigger, we can try making the trigger execution process to wait for some time using sleep method Example: I have created a custom trigger which fires after creation of record(REST createRecord). I somehow managed to pause execution time for a specific period using Thread.sleep(1000); for one second. public class CustomTrigger extends RuntimeTrigger { /** * Constructor. */ public CustomTrigger(TriggerDef triggerDef, DataObject data, Date triggerDate) { super(triggerDef, data, triggerDate); } /** * Actually run trigger. */ @Override public void trigger(TriggerRunner runner) throws Exception { Thread.sleep(1000); //Trigger logic goes here. // runner.addCutoffTimestamp(60000); //User user=runner.getUser(); } } Regards, Shiva

Continue reading...
 
Status
Not open for further replies.
Back
Top