logoCloudomation Docs


    Cloudomation automatically creates savepoints of your running executions. Savepoints can be used to recover an execution after an error.

    A savepoint is created automatically every time your script calls Cloudomation.

    Savepoints contain all information needed for the execution to resume at exactly the same instruction and going forward. Additionally the line and name of the Flow-API call and the timestamp is stored.

    It is possible to revert an execution to the state of a savepoint for it to resume operation from the instruction. The complete state of the execution is restored, including all variables used in the execution.

    Restoring an execution to a savepoint does not however affect other objects, like Cloudomation settings, Cloudomation files, or third party systems. Only the execution is restored. Objects which the execution already modified will remain modified.

    Types of Savepoints

    Additionally to the automatically created implicit savepoints, a Flow script can explicitly request a savepoint to be created. Such explicit savepoints can also be assigned a name.

    Using Savepoints

    Create a named Savepoint

    The Flow-API command create_dump(name) creates an explicit, named savepoint.

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    # fetch some data
    data = this.connect(
    fetch='SELECT * FROM data',
    # create a named savepoint
    # in case of an error the execution can be reverted
    # to this state and resume normal operations
    # process the data
    # in case the remote-api call fails it is possible to
    # revert to the savepoint above and retry the remote-api call
    # without having to fetch the data again
    return this.success('all done')

    Restore an execution to a Savepoint

    It is possible to restore a savepoint using the Flow-API:

    this.load_dump('with-fetched-data', by='name')
    # or by ID
    Be careful to avoid loops when restoring a Savepoint using `this.load_dump()`

    It is also possible to restore a savepoint using the User-Interface:

    • open an execution
    • click on Load savepoint
    • enter id=<savepoint-id> or name=<savepoint-name> and click ok
    Knowledge Base — Previous
    Running Flow Scripts Remotely
    Next — Knowledge Base