Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By froleo
#826206
Hi!
I'm exploring the Processmaker REST API by creating a frontend in ReactJS.

I have a simple process. Admin is assigned a starting task, the case is then routed to a parallel task which is assigned to two (or more) users with regular operator permissions.

The task then shows up in the assigned users inboxes, and I can click done. Completing the process works fine in the processmaker UI. When both users have finished their tasks, the case status is set to "Completed".

I'm facing a problem when I try to replicate this in my application.
First I POST and route the case logged in as admin.

I log in as operator 1 or 2, the case successfully shows up in the list of TODO cases. I can route the case from user 1 by sending the del_index: "2" in request the body, but when I try with user 2, using del_index:"3" i get:
Code: Select all
{"error":{"code":400,"message":"Bad Request: This case is assigned to another user"}}
How can I route a parallell task / set it as "done" for each user using REST? I need several users to perform the same task in the case.
By froleo
#826260
Thank you @amosbatto, that worked perfectly! :D

I tried using extraRest earlier and I had some 401 unauthorized issues, but that turned out to be an unrelated error in my code causing the access_token to not being sent with the request every time.

AI bot development involves creating intelligent b[…]

AI bot development encompasses creating intelligen[…]

A stake clone script is a pre-coded solution desig[…]

The bet365 clone script offers a ready-made soluti[…]