Using Asynchronous Gloop Steps
This example service demonstrates the use of the Asynchronous property. Asynchronous steps are Gloop Steps that run in a separate thread, so that the service won't wait for it to finish and continue to the next step.
Please take note that due to some limitations in the Coder debugger, asynchronous steps are executed synchronously when
debugging. If you'd like to test asynchronous steps in an asynchronous fashion, the Invoke in Browser option should be
used to invoke the Gloop service. To do this, right-click
code/asyncStep/asyncStepDemo.gloop and select
Invoke In Browser.
Once invoked, you should see the following output in the TORO Integrate console.
1 2 3 4 5 6 7 8 9 10 11 12 13
05/03/18 10:07:09.036 INFO [Integrate] asyncStepDemo: I will now start countdown.gloop asynchronously 05/03/18 10:07:09.043 INFO [Integrate] asyncStepDemo: Countdown should still be running after this. If not, please invoke asyncStepDemo.gloop from the browser >>>>ESBPackage [name=examples] 05/03/18 10:07:09.055 INFO [Integrate] exampleProperty is: example value 05/03/18 10:07:09.195 INFO [Integrate] countdown: Current count is 0 05/03/18 10:07:09.349 INFO [Integrate] countdown: Current count is 1 05/03/18 10:07:09.505 INFO [Integrate] countdown: Current count is 2 05/03/18 10:07:09.660 INFO [Integrate] countdown: Current count is 3 ... 05/03/18 10:07:12.942 INFO [Integrate] countdown: Finished counting