Skip to content

Instantly share code, notes, and snippets.

@Noordsestern
Last active September 15, 2021 12:25
Show Gist options
  • Save Noordsestern/a70ebbf9d8733dcc6a903f2162612e7f to your computer and use it in GitHub Desktop.
Save Noordsestern/a70ebbf9d8733dcc6a903f2162612e7f to your computer and use it in GitHub Desktop.
How to delete historic process instances in Camunda with Robot Framework
*** Settings ***
Library RequestsLibrary
Library json
*** Variables ***
${START_BEFORE} 2021-08-01T00:00:00.000+0200
${CAMUNDA_URL} http://localhost:8080
*** Tasks ***
Get history
${params} Create Dictionary startedBefore=${START_BEFORE}
${response} GET url=${CAMUNDA_URL}/engine-rest/history/process-instance params=${params}
${historic_process_instances} json.loads ${response.text}
FOR ${process_instance} IN @{historic_process_instances}
${result} DELETE url=${CAMUNDA_URL}/engine-rest/history/process-instance/${process_instance}[id]
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment