Hi Team,
I am using Activiti-REST API's (5.22.0).
I have created a process definition and deployed successfully.
I want to start a new instance every time when the request comes. While starting the instance i also want to uniquely name the instance, which can be done using business key.
The instance gets created successfully. Now i want to do following API calls using business-key and not using process-instance id: (few i am able to do successfully which i have listed)
1) Suspend/Activate a process instance using business key ?
2) Get running instance using business key- Please confirm whether correct?
activiti-rest/service/runtime/process-instances?businessKey=process_V2
3) Get Diagram?
4) Get active task - Please confirm whether correct?
activiti-rest/service/runtime/tasks?processInstanceBusinessKey=process_V2
5) Completing a task?
6) Add Users/Groups to process instance/definition ?
Looking forward for your support as always.
Thanks in advance.
You are missing the point of the business key.
It is a generic metadata element that is NOT guaranteed to be unique per instance.
Meaning, it means what you want it to mean in your solution.
Therefore, there are no API's available to act on individual instances by business key.
That said, you can achieve all of what you need, but not with a single API call.
Your options:
1. Use standard query API's (for instances or tasks) which accept business key as an argument.
then....
2. Use the returned results to do what you choose (suspend, activate etc).
OR....
Extend the API to create custom calls that "assume" business key is unique.
G
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.