Mongo Playground

Configuration

[{"name":"flow1","description":"flow 1 description","processes":[{"processId":"firstProcessId","name":"firstProcessName","startedAt":null,"finishedAt":null,"status":"PENDING","steps":[{"stepId":"foo","status":"PENDING","startedAt":null,"finishedAt":null},{"stepId":"bar","status":"PENDING","startedAt":null,"finishedAt":null}/**/ ...*/]},{"processId":"secondProcessId","name":"secondProcessName","startedAt":null,"finishedAt":null,"status":"PENDING","steps":[{"stepId":"foo","status":"PENDING","startedAt":null,"finishedAt":null},{"stepId":"xyz","status":"PENDING","startedAt":null,"finishedAt":null}/**...*/]}]}]

Query

db.collection.update({"name":"flow1"},{$set:{"processes.$[process].steps.$[step].status":"RUNNING"}},{arrayFilters:[{"process.processId":"firstProcessId"},{"step.stepId":"foo"}]})

Result