I have several questions about the flowable rest api.
Currently, I am using flowable rest-api in python.
The app is for file uploading from the client. After the uploading is done from the client, the information will be sent to the microservice to save it.
The first http request successfully passed the body to the microservice.
But for receive task, I sent a post request to ‘/service/query/executions’ with this payload.
payload = {
'processInstanceId': process_instance_id (<- execution.getProcessInstance() from the 1st http task),
'activityId': 'check-file-existed' (<-name of the receive task)
}
But the result is {“data”:[],“total”:0,“start”:0,“sort”:“processInstanceId”,“order”:“asc”,“size”:0}.
Questions.
I am wondering why the result data is empty, even if the process_instance_id is not null.
When the processInstanceId is created, how the processinstanceId interact with acitivityIds within the same deployment?
when is activityid available to use?
What is the ‘completed’ in the result? Even if I’ve got the right result, completed is False.
According to your answer, the process instance will visit all activities.
Please find out the process that I’ve tried…
post request to /service/runtime/process-instances
The process instance id is executed by ${execution.getProcessInstance()} in the first node (Request Insert Data).
post request to /service/query/executions with processInstanceId and activityId(wait-finish-flag).
But, the result of the /service/query/executions is
{“data”:[],“total”:0,“start”:0,“sort”:“processInstanceId”,“order”:“asc”,“size”:0}
So, I couldn’t send put request to /service/query/executions because there is no execution ID from #2.
So, I’ve tried to send post request to /service/query/executions after getting result from the post request (/service/runtime/process-instances) is done.
– post request to /service/query/executions with processDefinitionKey and activityId.
What happens when you only use the process instance id?
Could it be that you’re calling it too quickly - i.e. the http task is still being done?
I don’t see anything that would explain what you’re seeing, the process you’re using is simple and straight-forwards. There should be an execution coming back that’s waiting in the receive task.