Project

General

Profile

Actions

Defect #2118

closed

Approving by manager not work properly on some environment (Groovy calls wrong method)

Added by Vít Švanda about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondrej Husník
Category:
Workflow
Target version:
Start date:
03/12/2020
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

This happens when the criticality of the role for manager approval is set. Standard wf approval is OK.

…
org.activiti.engine.ActivitiException: Could not execute service task expression
…
Caused by: org.activiti.engine.ActivitiException: Unknown method used in expression: Approve role “{{${roleService.get(conceptRole.role).name}}}” assignment by manager for “{{${identityService.getNiceLabel(identityService.get(applicantIdentifier, null))}}}”
    at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:54)
    at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:69)
    ... 158 common frames omitted
Caused by: javax.el.MethodNotFoundException: Method not found: class eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmRoleService$$EnhancerBySpringCGLIB$$67c35363.get(java.util.UUID)
Actions #1

Updated by Vít Švanda about 4 years ago

I tried it and it works correctly in my environment. But this problem will be about groovy and the way he calls a methods.

Try to modify the workflow "approveRoleByManager.bpmn20.xml" and add a second parameter (null) to it.

Row 27: -> <serviceTask id="servicetask2" name="Create name of process" activiti:expression="Approve role &quot;{{${roleService.get(conceptRole.role, null).name}}}&quot; assignment by manager for &quot;{{${identityService.getNiceLabel(identityService.get(applicantIdentifier, null))}}}&quot;" activiti:resultVariableName="processInstanceName"></serviceTask>

Actions #2

Updated by Ondrej Husník about 4 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Ondrej Husník to Vít Švanda
  • % Done changed from 0 to 80

I tried to reproduce this defect on my environment but without any success. As suggested above I walked through that approved*.bpmn20.xml files and added explicitly second (null) parameter to prevent from this problem in future. Tests made by @svandav also covers the use case when manager is supposed to approve role assignment.

https://github.com/bcvsolutions/CzechIdMng/pull/94/commits/f78a133f8dc851e243120b642dbf86e4eeb304e2

Actions #3

Updated by Vít Švanda about 4 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Ondrej Husník
  • % Done changed from 80 to 100

I did review, looks nice. I merged it to the develop.

Actions #4

Updated by Radek Tomiška about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF