This content has been marked as final. 
    
Show                 2 replies
    
- 
        1. Re: Is a "potentialOwner" string a kind of a "magic" variable in jBPM 6.2 ? ;-)awizenm Jun 19, 2015 7:51 AM (in response to awizenm)OK, my question about the "potentialOwner" is a result of a confusion. The "potentialOwner" is just a parameter in my process definition. But there is a "potentialOwner" element in bpmn2 schema, which is apparently utilized by the jBPM implementation: <bpmn2:potentialOwner id="PotentialOwner_1"> <bpmn2:resourceAssignmentExpression id="ResourceAssignmentExpression_1"> <bpmn2:formalExpression id="FormalExpression_20">#{potentialOwner}</bpmn2:formalExpression> </bpmn2:resourceAssignmentExpression> </bpmn2:potentialOwner>I will try to remove this element entirely from my process definition and try to work with: userTaskService.nominate(taskId, userId, potentialOwners); 
- 
        2. Re: Is a "potentialOwner" string a kind of a "magic" variable in jBPM 6.2 ? ;-)awizenm Jun 19, 2015 11:02 AM (in response to awizenm)For today I have found some way to assign user using nominate. But I'm not really proud of it because using "Administrator" for this is also a "magic" trick. long processInstanceId = processService.startProcess(StartupBean.PROCESSES_DEPLOYMENT_ID, "myProcess"); List<Long> tasksByProcessInstanceId = runtimeDataService.getTasksByProcessInstanceId(processInstanceId); Long taskId = tasksByProcessInstanceId.get(0); List<OrganizationalEntity> potentialOwners = new ArrayList<OrganizationalEntity>(); potentialOwners.add(new UserImpl(currentUser)); userTaskService.nominate(taskId, "Administrator", potentialOwners ); userTaskService.start(taskId, currentUser); I still appreciate any suggestion on how to do the user assignment the right way. 
