From 1c62a367d8c4a8f64895d237ee73d1cd6fcf1c4e Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Tue, 27 Nov 2018 03:14:44 +0100 Subject: [PATCH] better error message if instance fails --- camunda-overlay/camunda.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/camunda-overlay/camunda.py b/camunda-overlay/camunda.py index 0706039..65ad271 100755 --- a/camunda-overlay/camunda.py +++ b/camunda-overlay/camunda.py @@ -86,6 +86,9 @@ def submit_terms(terms): def download_pdf(): instances = get_current_process_instances() + if len(instances) == 0: + print ("Error: no running instance found.") + return instance = instances[0]['id'] res = requests.get(CAMUNDA + 'process-instance/' + instance + '/variables') try: -- 2.43.0