Short version:
I created a process with automatic tasks informing a backend about the beginning/end of the instance or tasks.
The backend is then called via the default http-connector with the id of the process instance in the body.
My backend receives the request fine and trys to call the camunda /task?processInstanceId=id
and /process-instance/id
endpoints with the id provided py the connectors request.
Using this id the REST-API returns Process instance with id … does not exist.
Taking a look at the cockpit or making a manual REST request the id works fine.
Camunda Specs
I run Camunda in a Docker container with default settings.
Server version name | Apache Tomcat/9.0.33 |
Server built | Mar 11 2020 09:31:38 UTC |
Server version number | 9.0.33.0 |
OS Name | Linux |
OS Version | 5.6.10-arch1-1 |
Architecture | amd64 |
Java Home | valid path |
JVM Version | 11.0.4+4-alpine-r1 |
JVM Vendor | Alpine |
Backend Application
The backend is a python Django server, running with version 3.0.5.
Other requests to the camunda API work fine.
The code for the request:
from requests import get as getrequest
endpoint = f"process-instance/{id}"
request = getrequest(
url=camunda_rest_url + endpoint,
headers={
"content-type": "application/json"
},
data=None
)
return request
Long version:
A new process instance is started via the Camunda web client tasklist.
The first task in the process uses a http-connector to send a post request to the django backend containing only the process-instance id.
The backend trys to get the process via the /process-instance/id
endpoint.
Camunda returns { 'type': 'InvalidRequestException', 'message': 'Process instance with id ... does not exist' }
The backend thread crashes because of currently nonexistent error handling.
Maybe Important: The request from the connector would only receive a response after the successful fetch of the process-instance and activity.
So when i try to reach the REST-API the request from the connector is sill pending. Could this be an issue?
Calling the API directly via insomnia works fine.
The instance is also listed in the Camunda Cockpit.
Other API calls to the Camunda REST-API using formated strings provided no issues.
Other code:
The endpoint called by the connector
def post(self, request, format=None):
new_process(request) # trying to fetch the data
return Response( # return response afterwards
status=status.HTTP_200_OK
)