Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Question: Picking a running workflow to trigger a signal method #10

Open
ganeshanj82 opened this issue Dec 31, 2019 · 2 comments
Open

Comments

@ganeshanj82
Copy link

Hi,
I am evaluating using cadence (python) for a workflow project. An important part of the workflow is to call a 3rd party service and wait for a result to come back (with timeout). This seems like a good use for the signal method. The 3rd party service message will be received asynchronously from SQS. In this case, how do I get the right workflow instance to trigger the signal on assuming that there are several workflows running with different ids? The pattern I was thinking of using in the sqs handler is:

  • Retrieve a id from the message that maps to a running workflow id via some mechanism
  • Retrieve a running workflow with that id if one exists
  • If a workflow exists with that specific id, trigger the signal method on it.

Please let me know if this is possible, I was unable to find it from reading the code, but I might have missed something.

@firdaus
Copy link
Owner

firdaus commented Jan 2, 2020

Hi there, it's not yet ready for that use case yet.

I need to implement:
WorkflowClient.newWorkflowStub(Class workflowInterface, String workflowId);

So that you can look up the active workflow when that SQS message comes in.

Thanks for bringing this to my attention. I don't know how I missed it.

I'll schedule this for Phase 1.

@MrSaints
Copy link

MrSaints commented Mar 4, 2020

Seems to be done by 566b976

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants