public void removeWorkflow(String workflowId, boolean archiveWorkflow) {
        WorkflowModel workflow = getWorkflowModelFromDataStore(workflowId, true);

        executionDAO.removeWorkflow(workflowId);
        try {
            removeWorkflowIndex(workflow, archiveWorkflow);
        } catch (JsonProcessingException e) {
            throw new TransientException("Workflow can not be serialized to json", e);
        }

        workflow.getTasks()
                .forEach(
                        task -> {
                            try {
                                removeTaskIndex(workflow, task, archiveWorkflow);
                            } catch (JsonProcessingException e) {
                                throw new TransientException(
                                        String.format(
                                                "Task %s of workflow %s can not be serialized to json",
                                                task.getTaskId(), workflow.getWorkflowId()),
                                        e);
                            }

                            try {
                                queueDAO.remove(QueueUtils.getQueueName(task), task.getTaskId());
                            } catch (Exception e) {
                                LOGGER.info(
                                        "Error removing task: {} of workflow: {} from {} queue",
                                        workflowId,
                                        task.getTaskId(),
                                        QueueUtils.getQueueName(task),
                                        e);
                            }
                        });

        try {
            queueDAO.remove(DECIDER_QUEUE, workflowId);
        } catch (Exception e) {
            LOGGER.info("Error removing workflow: {} from decider queue", workflowId, e);
        }
    }
Removes the workflow from the data store.

@param workflowId the id of the workflow to be removed
@param archiveWorkflow if true, the workflow and associated tasks will be archived in the
    {@link IndexDAO} after removal from {@link ExecutionDAO}.
core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java