@Override
    public void updateTask(TaskModel task) {
        try {
            // TODO: calculate the shard number the task belongs to
            String taskPayload = toJson(task);
            recordCassandraDaoRequests("updateTask", task.getTaskType(), task.getWorkflowType());
            recordCassandraDaoPayloadSize(
                    "updateTask", taskPayload.length(), task.getTaskType(), task.getWorkflowType());
            session.execute(
                    insertTaskStatement.bind(
                            UUID.fromString(task.getWorkflowInstanceId()),
                            DEFAULT_SHARD_ID,
                            task.getTaskId(),
                            taskPayload));
            if (task.getTaskDefinition().isPresent()
                    && task.getTaskDefinition().get().concurrencyLimit() > 0) {
                if (task.getStatus().isTerminal()) {
                    removeTaskFromLimit(task);
                } else if (task.getStatus() == TaskModel.Status.IN_PROGRESS) {
                    addTaskToLimit(task);
                }
            }
        } catch (DriverException e) {
            Monitors.error(CLASS_NAME, "updateTask");
            String errorMsg =
                    String.format(
                            "Error updating task: %s in workflow: %s",
                            task.getTaskId(), task.getWorkflowInstanceId());
            LOGGER.error(errorMsg, e);
            throw new TransientException(errorMsg, e);
        }
    }
Inserts tasks into the Cassandra datastore. <b>Note:</b> Creates the task_id to workflow_id
mapping in the task_lookup table first. Once this succeeds, inserts the tasks into the
workflows table. Tasks belonging to the same shard are created using batch statements.

@param tasks tasks to be created
cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java