Skip to content

Commit b993b7a

Browse files
committed
Add get_process_instance_history function
1 parent 8a3e2e8 commit b993b7a

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
This repo is an evolution of https://github.com/camunda-community-hub/camunda-external-task-client-python3.
44

5-
It has been adapted for the use with the [Operaton](https://operaton.org/) BPMN engine.
5+
The following changes have been made in the original implementation:
6+
- renamed Camunda to Operation for the use with the [Operaton](https://operaton.org/) BPMN engine
7+
- added a function to retrieve the history of a process instance
8+
69

710
## Introduction
811

operaton/client/engine_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,10 @@ def get_process_instance_variable(self, process_instance_id, variable_name, with
178178
if with_meta:
179179
return dict(resp_json, value=decoded_value)
180180
return decoded_value
181+
182+
def get_process_instance_history(self, process_instance_id):
183+
url = f"{self.engine_base_url}/history/process-instance/{process_instance_id}"
184+
response = requests.get(url, headers=self._get_headers())
185+
raise_exception_if_not_ok(response)
186+
resp_json = response.json()
187+
return resp_json

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "operaton_external_task_client_python3"
7-
version = "1.0.2"
7+
version = "1.0.3"
88
authors = [
99
{ name = "Deserve Labs", email="devteam@deserve.com" },
1010
{ name = "DLR terrabyte", email="terrabyte@dlr.de" }

0 commit comments

Comments
 (0)