Last active
September 15, 2021 12:25
-
-
Save Noordsestern/a70ebbf9d8733dcc6a903f2162612e7f to your computer and use it in GitHub Desktop.
How to delete historic process instances in Camunda with Robot Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** 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