Sequential execution of workflows

Hi all,
Could you please advise me on how to figure out my problem better?

Let’s say I have a workflow Foo. I need to execute workflows sequentially in the context of arguments (for a particular user).

So, I need the following scenario:

  1. I create a workflow for the user with ID 123.
  2. Worker starts execution of this workflow.
  3. After 50ms, I create a workflow for the same user.
  4. The workflow from the p.3 blocks and wait until the workflow from the p.1 will be finished.
  5. Workflow from p.1 finishes. I start processing the workflow from p.3

So, I need something similar to a distributed lock (redlock, if you are familiar with Redis).

Thank you!