cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.12.1 - Unknown property used in expression:ldapService

minalghorpade
Champ in-the-making
Champ in-the-making
Hi  ,
  I am new to Activiti . I am using ACTIVITI 5.12.1  n follwoing userguide for each n evrything.
Now I am Facing problem in activiti n spring integration . I am trying simple user task with assignee .For this I am refering userguide.

<userTask id="task" name="My Task" activiti:assignee="${ldapService.findManagerForEmployee(emp)}"/>

I am getting this error :-

ActivitiException: Unknown property used in expression:${ldapService.findManagerForEmployee(employeeName)}

where as I have already define ldapService bean in activiti-standalone-context.xml file of activiti-explorer .

Please assist me on how to get over this.

Thanks
Minal
5 REPLIES 5

pratikbhatt
Champ in-the-making
Champ in-the-making
Please check… This exception arise when stored value of variable is null! or Variable in Expression could not be settled from bean..! same error I have faced…

minalghorpade
Champ in-the-making
Champ in-the-making
Hi..
   Thanks Pratik for your reply. Actully I am newbiee in  development , I didn't understand exactly what you are saying .
Can you please explain me  step by step ? 

Thanks
Minal

minalghorpade
Champ in-the-making
Champ in-the-making
I want to use this type of assigment to be done in my workflow for usertask :-
  userTask id="task" name="My Task" activiti:candidateGroups="${ldapService.findManagers()}" 

I have written java class named  " LdapServices " which has my logic to find  group.
and
I have define bean id as  : -  bean id="ldapService" class="com.genex.services.LdapService"       in activiti-cfg.xml file .

but still getting same error as  ActivitiException: Unknown property used in expression:${ldapService.findManagerForEmployee(employeeName)}

please help me where should I define this ldapService bean so that It get worked .

Please help .

Thanks
Minal


pratikbhatt
Champ in-the-making
Champ in-the-making
hi minal

Actually I haven't done this type of program which you are doing but what I know is when we use "service task" in process flow  to access java class, we have to set Variable using JavaDelegate Interface… and this simple process illustrated below


import org.activiti.engine.delegate.*;
import org.bean.getterSetter;

public class CustomerDetails implements JavaDelegate {
@Override
public void execute(DelegateExecution DE) {
  BeanClass bc = new BeanClass();     //this instance is from bean class getterSetter which is imported above
  bc.setName((String) DE.getVariable("name"));
  bc.setSurname((String) DE.getVariable("surname"));
  DE.setVariables("customerDetails", bc);  //here we set variable which can be accessed from process "${customerDetails.name}, ${customerDetails.surname}"
        }
}

pratikbhatt
Champ in-the-making
Champ in-the-making
if you want then mail your .bpmn file on my id "rinkbhatt@gmail.com" so I can figure out your problem…
thanks…
regard