In ecFlow there are many different ways of creating the suite definition.
This section will outline some of the approaches that could be taken, along with advantages and disadvantages. Which approach is best depends on the users circumstance.
The suite definition can be built using the Suite Definition API. This takes a correct by construction approach and hence is less error prone.The definition can be loaded into the server directly from Python or written to a file, for later loading via ecflow_client.
Can take full advantage of Python’s object oriented features, to create small/large suites. The suite definition can be retrieved from the server and all node tree, state data is directly accessible in Python. ( see How can I access the path and task states ? as an example) In addition Checking job creation and simulation is available from the Python API.
This approach is suitable for small suites only, since there are no conditional’s, looping structures or functions.
The definition can be retrieved from the server and written to standard output. i.e.
> ecflow_client --get
> ecflow_client --get_state
Although feasible this would be very cumbersome.
Here we can take advantage of the language that the user is familiar with. This is then used to generate the suite definition using the Definition file Grammar. This approach allows use of conditionals, looping structures, and functions to create larger suite definition‘s.
The generated definition can then be loaded into the ecflow_server, using ecflow_client. However like the Text Only approach if you need to extract status data from the suite definition returned from the server, it would require separate parsing.