delayed workflow with timer
Hi guys,
I am facing following scenario.
I need to create sort of workflow, which starts upon customer action (aka button) it will start certain process/remote test (started with REST Call - 3rd party system, no callbacks, no promises etc.) and after a while I need to start another service which than parses the result.
I wanted to do it with timer (set for 1minute, but that is not the important part).
The timer is set to:
Automatically Enable Timer on Startup - False
Thing is active - False
Enabled - Flase
User action will start the service, which makes 3rd party RPC (remote procedure call), then activates the Timer Thing, restarts the Thing (otherwise I have some errors....) enable Timer thing. In my another Thing I have a subscription to that Timer, (timer event) which makes the parsing and than disable Timer and inactivate it.
Problem is that sometime Event is fired at the same time as the TimerThing is Active - true (since I have my subscription on Timer event and not on Thing start, I would expect that it will wait the preconfigured time before event is fired).
Sometimes event is fired (at least the service in subscription says so) after 4 minutes instead of 1minute, and some time it is not fired at all.
What am I missing, is there any safe sequence how to start stop timer.
Is there more elegant way how to start some service, wait and start another?
Some non-blocking background style flow???
Thanks a lot

