cancel
Showing results for 
Search instead for 
Did you mean: 

rest service in activiti enterprise

tgebeyehu
Champ in-the-making
Champ in-the-making
is the rest service built in the Enterprise Activiti?

i use rest call to start process on the activiti-explorer. i want to apply this on the enterprise version. i recently got Activiti Enterprise 1.1 and created a process and i want to start this process out side of activiti. but i did not see any activiti-rest in the package and i wonder if it is included in acitivi-app.

on the community version i post to
http://kermit:kermit@localhost:8081/activiti-rest/service/runtime/process-instances. and it can start the process instance. but i have no idea how to do this to the enterprise one.

can anyone gives me some explanation on how i can use the rest on Activiti Enterprise?


Thank you.
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
Yes, the rest service is available under /api. There is a dedicated API for the Suite and the REST API of open source is available too.
In your use case it would be api/runtime/process-instances. You do need a user with tenant admin/manager rights to be able to do so.

tgebeyehu
Champ in-the-making
Champ in-the-making
jbarrez Thank you for your response ,

i tried it as you said and now i am able to start the process-instance. but i am having a problem in claiming a task.

what i did is that, i pass three variables (form properties) with the process id on the rest call. i can see that the process is started, the variables are passed and the task is assigned to the group. when i logged in as a member of that group i can see the task assigned to that group but the claim button on the right corner is not showing. so i am unable to complete the task. any idea why ?

Thank you in advance!

jbarrez
Star Contributor
Star Contributor
Hmm that sounds odd for sure. So just to verify: you can see the task when you select your group in the task list?

Could you check your database and see the entry in the ACT_RU_TASK for that task, and more specifically which users/groups it is assigned to.

tgebeyehu
Champ in-the-making
Champ in-the-making
Hey jbarrez
ASSIGNE_ is NULL. it  is not actually assigned to any one. but in activiti-admin i can see tha tthe process instance has 1 task and the variables i passed. And inside that task the Identity link is type = candidate and GroupId is the id of the group the the Group table. but i am not sure why it doesn't assign it to the group

trademak
Star Contributor
Star Contributor
A task can only be assigned to a specific person. Groups can only be connected to a task as candidate groups and in the database this is stored as identity links.

Best regards,

tgebeyehu
Champ in-the-making
Champ in-the-making
so i have tried a lot of ways. when i use the assignment to Assigned to a single user i can see that the task is assigned to the user and when i login as that user the task will be open. but when i assign it as a candidate group / user i see the task assigned to them but couldn't see the claim button (couldn't claim and complete it).

this is how i pass the process instance and the variable in my code which actually works fine i guess

  JSONObject js= new JSONObject();
    js.put("processDefinitionId", "testing:1:7662");
    js.put("variables",jr);
    StringEntity params=new StringEntity(js.toString());
    post.setEntity(params);

jbarrez
Star Contributor
Star Contributor
So just to recap:

1) You see the process instance has started?
2) you log in and see the task when you filter by group?
3) The claim button is missing

Could you post the process here so we can have a look? Sounds very strange, what you are seeing, and the information provided above all seems to be correct