public void resetWorkflow(String workflowId) {
        getWorkflowModelFromDataStore(workflowId, true);
        executionDAO.removeWorkflow(workflowId);
        try {
            if (properties.isAsyncIndexingEnabled()) {
                indexDAO.asyncRemoveWorkflow(workflowId);
            } else {
                indexDAO.removeWorkflow(workflowId);
            }
        } catch (Exception e) {
            throw new TransientException("Error resetting workflow state: " + workflowId, e);
        }
    }
Reset the workflow state by removing from the {@link ExecutionDAO} and removing this workflow
from the {@link IndexDAO}.

@param workflowId the workflow id to be reset
core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java