Some of these variables must be set and exported before any of the ecflow_client commands are executed. Since the script/job can call ecflow_client, then typically they are all set in an include file in the header of the task so that all tasks would have them correctly set.
For a full list of environment variables used by ecflow_client please see the Glossary.