Using simulation mode to try out graph branching

Sometimes you want to test how a branching workflow will run. You can use simulation mode to test workflows that branch on success or failure.

Here is an example where you want to get some data and carry out analysis. If the data is missing you are happy to skip the analysis and carry on:

        T-00 = """
            get_data:succeed? => analyse_data
            get_data:fail? | analyse_data => housekeep
        """

You can use simulation mode to check failure handling. To do this you tell simulation mode to make some tasks fail. Add the following to the [runtime][get_data] task:

        [[[simulation]]]
            fail cycle points = 1900-01-01T02:00, 1900-01-01T07:00

… and run the workflow in simulation mode

cylc vip --mode simulation

You can then look at the workflow logs and check if the Cylc ran the analyse_data tasks for those cycles.

2 Likes