Is it possible to create many instances of the same workflow but in such a way that each workflow has the same workflow ID but a different run ID?
A silly example here. Let’s say that I have different types of vehicles that I want to model as Temporal workflows. I create a
Car workflow with some specific logic (start up, drive, park, etc.). I want each
Car workflow to have the same workflow ID (
car-workflow) but for each different car that I’m modeling to have a different run ID. That way, when I want to interact with a specific
Car workflow (query it, signal it, terminate it, etc.) I don’t need two separate opaque identifiers to discover it. I just need
car-workflow and the run ID.
I should make it clear that these workflows have no
ContinueAsError logic or anything like that.
I’ve tried to create this kind of workflow but every time I try to execute it from my starter logic, it doesn’t create a new workflow. Instead, it returns the workflow ID and run ID of a workflow that already exists.
It is possible, of course, that this goes against Temporal’s whole worldview and that it’s a bad idea. Please tell me if so
- I’ve been using the Go SDK