cancel
Showing results for 
Search instead for 
Did you mean: 

Changed GROUP_ID_ column value in ACTIVITI_RU_IDENTITYLINK

samratrcs
Champ in-the-making
Champ in-the-making
I changed the GROUP_ID_ column value in ACTIVITI_RU_IDENTITYLINK value from PLCM to PLCM1 for tweaking a busimess logic. Now again when I am changing the group to PLCM the following error is coming while claiming a task.


Caused by: org.activiti.engine.ActivitiException: Cannot assign a groupId to a task assignment that already has a userId
        at org.activiti.engine.impl.persistence.entity.IdentityLinkEntity.setGroupId(IdentityLinkEntity.java:132)
        at sun.reflect.GeneratedMethodAccessor36945.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.ibatis.reflection.invoker.MethodInvoker.invoke(MethodInvoker.java:37)
        at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(Bean                                                                            Wrapper.java:169)
        … 445 more


Can you please help me with tjis. The system is live in production.
8 REPLIES 8

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

you are referring to the following case
org.activiti.engine.test.api.task.TaskServiceTest#testClaimAlreadyClaimedTaskByOtherUser

(in activiti source)

regards
Martin

samratrcs
Champ in-the-making
Champ in-the-making
Hello Martin,

Thanks for the reply.
Can you please explain me the problem.
What can be the solution now?

Regards
Samrat

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
use claim/unclaim. Already claimed task can not be claimed again


  /**
   * Claim responsibility for a task: the given user is made assignee for the task.
   * The difference with {@link #setAssignee(String, String)} is that here
   * a check is done if the task already has a user assigned to it.
   * No check is done whether the user is known by the identity component.
   * @param taskId task to claim, cannot be null.
   * @param userId user that claims the task. When userId is null the task is unclaimed,
   * assigned to no one.
   * @throws ActivitiObjectNotFoundException when the task doesn't exist.
   * @throws ActivitiTaskAlreadyClaimedException when the task is already claimed by another user.
   */
  void claim(String taskId, String userId);
 
  /**
   * A shortcut to {@link #claim} with null user in order to unclaim the task
   * @param taskId task to unclaim, cannot be null.
   * @throws ActivitiObjectNotFoundException when the task doesn't exist.
   */
  void unclaim(String taskId);

samratrcs
Champ in-the-making
Champ in-the-making
Hi Martin,

The task is not claimed. The Assignee_ column of the ACT_RU_TASK table is null.

Regards
Samrat

martin_grofcik
Confirmed Champ
Confirmed Champ
Can you create jUnit test?
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin

samratrcs
Champ in-the-making
Champ in-the-making
Hello Martin,

A detailed log

Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'groupId' of 'class org.activiti.engine.impl.persistence.entity.IdentityLinkEntity' with value 'PLCM1' Cause: org.activiti.engine.ActivitiException: Cannot                                                                                         assign a groupId to a task assignment that already has a userId


The source of error is the following method.

public void completeTask(String taskId, Map<String, Object> decision) {
  taskService.complete(taskId, decision);
}

Regards
Samrat

samratrcs
Champ in-the-making
Champ in-the-making
The bpm file is attached
ACtiviti version : 5.13

jbarrez
Star Contributor
Star Contributor
Does the error still happen on the latest release? 5.13 is very old. Chances are it&#39;s already fixed in newer versions.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.