12-03-2014 10:09 AM
for (Task task : tasks) {
if( identityservice.createGroupQuery().groupName("GROUP_XXX").count()==0){
identityservice.newGroup("GROUP_1_PRODUKTAPPLIKATEUR");
}
if(!identityservice.createGroupQuery().list().contains(identityservice.createGroupQuery().groupId("GROUP_1_PRODUKTAPPLIKATEUR")
.groupMember("admin"))){
identityservice.createMembership("admin", "XXX");
}
taskService.claim(task.getId(), "GROUPXXX");
}
Caused by: org.apache.ibatis.exceptions.PersistenceException:
. . .
### The error may involve org.activiti.engine.impl.persistence.entity.MembershipRelation.insertMembership-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_ID_MEMBERSHIP (USER_ID_, GROUP_ID_) values ( ?, ? )
12-04-2014 02:57 AM
Group sales = identityService.newGroup("sales");
identityService.saveGroup(sales);
User johndoe = identityService.newUser("johndoe");
identityService.saveUser(johndoe);
// Create the membership
identityService.createMembership(johndoe.getId(), sales.getId());
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.