0

I'm building a flow process which requires user intervention at some point. I've read through the documentation and see that I'm supposed to use SWF signals to continue moving through my flow.

I'd like to know if there is a way to the flow wait for a signal without a timer.

when I use

  timer = create_timer_async(30)
  wait_for_any(timer, @signal_received)
  activity.activity_one

my 'activity_one' runs correctly and my workflow execution completes whether or not my signal was received in 30 seconds. But if I try to run

  wait_for_any(@signal_received)
  activity.activity_one

my activity_one never runs and it keeps looping on the decision task for 'wait_for_any'

Is there any way I can have it just hang on the process until a signal is received?

bertmaclin
  • 304
  • 3
  • 16

1 Answers1

0

From your description it sounds like the SDK is behaving as expected. In the first case, wait_for_any waits for EITHER the timer to fire (after 30 seconds) or the signal to be received. So as you mention, your activity runs correctly after 30 seconds, but only because the timer fires, not because the signal is received.

In the second case, since you are only waiting on the signal to be received, the activity never fires because the decider never receives the signal. My guess is that you are not firing the signal correctly. Can you explain how you are firing the signal?

Ana Todor
  • 781
  • 1
  • 6
  • 15