Thursday, April 14, 2011

Delaying Execution using PeopleCode

If you want to delay the execution through PeopleCode, try using this function. One example was when there was a requirement to delay the row insert interval. Another one, if to delay the process execution until the group parallel process need to be finished.

GetJavaClass("java.lang.Thread").sleep(&sleepSeconds * 1000);

2 comments:

  1. he web site was how do i say it… relevant, finally something that helped me. Many thanks

    ReplyDelete
  2. If the app.server runs on a windows machine, as ours does, use this code:

    Declare a function:
    Declare Function Sleep Library "kernel32"
    (long Value As number);

    Whenever peoplecode should be delayed, use this.

    Sleep(100);

    100 could be any number of course.

    ReplyDelete