Currently it seems only possible to have 1 WorkflowInstance associated to a WorkflowContext object. It would be very helpfull if you can have multiple WorkflowInstances running in parrallel. There might be more than 1 process applicable at the same time for 1 object.
For instance, when you are a tenant and you have a rental house where 1 family is moving out with all of its required steps in a workflow, and another family is moving in with all its required steps. I would like to run a seperate MoveIn and MoveOut workflow for my WorkflowContext RentalHouse object.
Hello Jef, thanks for your help! I've thought about using this way of working with WorkflowContexts as well, but I came up with this idea as it would probably be a prerequisite to have a 1-to-many relation for the next idea (Running Sub-Workflows within a parent Workflow for re-useability, #2422). For now I will find some workaround for that as well, but it would be very convenient having these options out-of-the-box.
Back when we came up with the idea of the WorkflowContext entity we envisioned associations being really helpful here, and this entity being mainly the glue between related data and the workflow itself. There is a small Workflow Best Practices section at the end of the Setting up the Basics document (arguably it is not the ideal place for this information) that also highlights this idea with an example.
In your example, I would recommend a setup similar to this:
The main benefit here is that you can use the WorkflowContext entities to store extra information that is only relevant for the workflow itself, and keep your Tenant and Property entities “clean”.
We will still look at your idea though, and will continue to think about ways to improve the setup and flow of data in your workflows, so thank you for the feedback.
Hope this helps!