Is it possible to send signal to activity?

Hi Team,

This is the logic of my activity.

  1. do something.
  2. wait for a signal (external trigger)
  3. continue to do something then finish

If I don’t want to breakdown one activity to multiple ones, Here are two approaches I’m considering.

  1. Send a signal to the activity.
    or
  2. Update search attributes or memo of a workflow externally, the activity can keep checking the value until it is updated.

Could you please share your thoughts, what’s your suggestion to achieve this ?

Thanks in advance!

Thanks
Gaoxin

Send a signal to the activity.

There is no functionality to send signal to an activity.

Update search attributes or memo of a workflow externally, the activity can keep checking the value until it is updated.

Activity worker (when executing the activity) will need to periodically check the target attribute, which indicates more work to be done, plus unnecessary load.

I would suggest split the activity into multiple pieces & necessary workflow signal handling to unblock the remaining logic.

Thanks for your reply, I’m curious is it possible to update workflow attributes externally?

Currently search attribute can only be updated by workflow commands (i.e. within workflow, by using SDK).

Is is possibly for operator to directly change the record on ElasticSearch, just like changing a DB record. However this is highly unrecommended.

You can use task routing to ensure the execution of multiple activities on the same process. Which is almost the same as sending signals to activities.