Error child workflow already started

Got this error, never seen it before:


Seems to have orignated here:

Basically we generate a unique workflow ID for a device, and run this workflow. Can all ExecuteWorkflow return this error ? If so, do we solve it using this helper


would be better for us if it just ran again

This means that a child workflow with that ID was started already. Did you check that?

Yes it was already started and finished (1-2 month ago we ran it manually, as a regular workflow).

I was not aware that it was considered an error that the workflow had already ran. I thought it would just run again but with another runID ?

It depends on the WorkflowIdReusePolicy. But this only applies if a workflow is closed. There is no way to run two parallel workflows with the same WorkflowId. Don’t assign a child workflow id or ignore the “AlreadyStarted” exception in the parent.

1 Like

ofc yes, I see that the workflow was running when it got this error, so it makes sense now, need to figure out why it was running for so long, but anyway, no issue with temporal just our logic.