cancel
Showing results for 
Search instead for 
Did you mean: 

REST API creates the tasks with assignee defaulted as login user

shailk
Champ in-the-making
Champ in-the-making
I am creating BPMN process instance in which first step creates user task which is external (orbeon) form capture.

I am calling runtime/process-instances REST API which has initiator variable parameter passed as "kermit" but nothing is defined in BPMN process XML but even though the assignee is always updated as "kermit" and owner is also updated as "kermit".

I am attaching herewith BPMN process xml and the output from rest client.


id: "22510"
url: "http://localhost:8082/activiti-rest/service/runtime/tasks/22510"
owner: "kermit"
assignee: "kermit"
delegationState: null
name: "Capture form"
description: null
createTime: "2015-06-15T16:32:55.417+01:00"
dueDate: "2015-06-15T17:02:55.420+01:00"
priority: 50
suspended: false
taskDefinitionKey: "theTask"
tenantId: ""
category: null
formKey: "http://localhost:8082/orbeon/fr/TestWorkflow/TestWorkflow/new"
parentTaskId: null
parentTaskUrl: null
executionId: "22501"
executionUrl: "http://localhost:8082/activiti-rest/service/runtime/executions/22501"
processInstanceId: "22501"
processInstanceUrl: "http://localhost:8082/activiti-rest/service/runtime/process-instances/22501"
processDefinitionId: "oneTaskProcess:1:34"
processDefinitionUrl: "http://localhost:8082/activiti-rest/service/repository/process-definitions/oneTaskProcess:1:34"
variables: [0]


17 REPLIES 17

jbarrez
Star Contributor
Star Contributor
I am not following here, so you create a process instance of that definition and the task is always assigned to kermit?

shailk
Champ in-the-making
Champ in-the-making
yes thats correct understanding… I dont know why it assumes that task needs to be assigned to same user who has created the process instance. The task should initially be assigned to group and then user from that group should choose the task…

trademak
Star Contributor
Star Contributor
Can you create a unit test showing this issue?
We are using and testing this logic a lot and I haven't seen any odd behaviour in it, so would be good to have a unit test showing the issue.

Best regards,

jinqin1
Champ in-the-making
Champ in-the-making
I have the same issue here. Is there any way to make the assignee a group instead of default to user who created the instance ?

shailk
Champ in-the-making
Champ in-the-making
Why it updates the assignee_ column in table ACT_RU_TASK?

I think the issue is when we create new task on start of process instance the record is created in this table and the assignee_ column is updated with authenticated user.

Sorry I dont have test cases since I am still in evaluation phase for using Activiti workflow and creating demo application for my client. I am using REST APIfrom WCF services since its microsoft windows stack.

trademak
Star Contributor
Star Contributor
Hi,

If the process definition contains an assignment rule to assign the user task to a specific group, Activiti has no logic to assign the task to an assignee instead of the configured group. So I don't understand what's happening here. How can I reproduce this exactly?

Best regards,

shailk
Champ in-the-making
Champ in-the-making
Hi,
I have attached my process definition in original thread and as you can see from the XML definition, the task is not assigned to anybody so why Acitivi is assigning to login user (authenticated user) which is "kermit" in my case.

To reproduce this:
1. Deploy the process definition file provided in Tomcat Activiti rest
2. Create the process instance for the process
3. Check the  tables or Activiti explorer and you will see the task created is always assigned to login user.

Hope this helps

trademak
Star Contributor
Star Contributor
Are you using the REST API to start the process instance or are you using the Explorer?
A cleaner way to test this, would be to use the Activiti Engine directly with the Java API or REST API. Because the Explorer is just a demo application.

Best regards,

shailk
Champ in-the-making
Champ in-the-making
I am using REST API to start the process instance as per user guide.

REST API URI - runtime/process-instances
Method as POST
Basic Authentication user/password : kermit/kermit

The task is always assigned to kermit even though nothing is specified in task definition.

Attached the process definition xml herewith.

Hope this helps.