Ok next challenge. I’m working on implementing a POC of this, but I’ve run into an interesting problem.
I don’t necessarily know the company ID ahead of time. Since there is not an API for workflow.SignalWithStart, I thought I might be able to trigger the batch workflow using workflow.ExecuteChildWorkflow, but this has 2 problems: 1) the batch workflow is now a child of whichever workflow got there first (not ideal) and 2) I’ve discovered that if I send a signal to the workflow before it has started (without specifying the runID) the signal appears to be lost.
I’m not sure if that 2nd problem is a bug or if it is expected behavior.
Here is a sample of the POC I have created, based on samples-go/expense: POC for batching work together. by jmoseley · Pull Request #1 · jmoseley/samples-go · GitHub
Is it possible to use SignalWithStart from within a workflow?