{% macro control_model_start() %}
    {% set model_name = model.name %}

    {{ elog("START macro -> control_model_start, model " ~ model_name, "INFO", 0)}}

    {{ elog("Get process_key for model " ~ model_name, "INFO", 1)}}
    {% set a_workflow_history_key = get_workflow_history_key() %}  
    {{ check_null("a_workflow_history_key", a_workflow_history_key) }}
    {{ elog("a_workflow_history_key: " ~ a_workflow_history_key, "INFO", 2)}}
    
    {{ elog("Run macro insert_A_TASK_HISTORY for model " ~ model_name, "INFO", 1)}}
    {{ insert_A_TASK_HISTORY(a_workflow_history_key, model_name) }}
    {% do run_query('COMMIT') %}    

    {{ elog("END macro -> control_model_start, model " ~ model_name, "INFO", 0)}}
{% endmacro %}