public WorkflowModel decideWithLock(WorkflowModel workflow) {
        if (workflow == null) {
            return null;
        }
        StopWatch watch = new StopWatch();
        watch.start();
        if (!executionLockService.acquireLock(workflow.getWorkflowId())) {
            return null;
        }
        try {
            return decide(workflow);

        } finally {
            executionLockService.releaseLock(workflow.getWorkflowId());
            watch.stop();
            Monitors.recordWorkflowDecisionTime(watch.getTime());
        }
    }
This method overloads the {@link #decide(String)}. It will acquire a lock and evaluate the
state of the workflow.

@param workflow the workflow to evaluate the state for
@return the workflow
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java