cancel
Showing results for 
Search instead for 
Did you mean: 

Getting : org.activiti.engine.ActivitiException: Unknown property used in expression: ${courseWorkflowRequestDraftedServiceTask}

mansi
Champ in-the-making
Champ in-the-making
Hi,

I have created two beans for serviceTasks as under:

   <bean id="checkCourseWorkflowInitiator" class="edu.bc.eagleapps.course.activiti.servicetask.CheckCourseWorkflowInitiator" >
        <property name="serviceLocatorService" ref="serviceLocatorService" />
    </bean>
   
    <bean id="courseWorkflowRequestDraftedServiceTask"            class="edu.bc.eagleapps.course.activiti.servicetask.CourseWorkflowRequestDraftedServiceTask" >
        <property name="serviceLocatorService" ref="serviceLocatorService" />
    </bean>


And I mention it in my process bpmn file as under: using activiti:delegateExpression


    <serviceTask id="sid-C8ED341D-B0C8-4A01-BA01-D6995834967A"
           name="Check if initiator belongs to student services"
           activiti:delegateExpression="${checkCourseWorkflowInitiator}" >
     </serviceTask>

    <serviceTask id="sid-24755FD3-22CE-4EDC-B83E-3FFB0D36F375"
           name="Change the State of the course to Draft and Put the course proposal in the reviewers outbox"
           activiti:delegateExpression="${courseWorkflowRequestDraftedServiceTask}"  >
     </serviceTask>



Now the issue is the first activiti:delegateExpression="${checkCourseWorkflowInitiator}"  works fine but the same configuration done for later activiti:delegateExpression="${courseWorkflowRequestDraftedServiceTask}" fails with error

org.activiti.engine.ActivitiException: Unknown property used in expression: ${courseWorkflowRequestDraftedServiceTask}
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53)


3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mansi,

Can you create a jUnit test?
https://forums.activiti.org/content/sticky-how-write-unit-test


Regards
Martin

mansi
Champ in-the-making
Champ in-the-making
Thanks Martin, for your quick reply.

I tried creating a test case as you suggested, but that worked fine !

Now let me explain you my situation:
I have a webapp, which creates processEngine as well as beans for delegate classes when deployed,
And from my test class when I try to start the process, it starts and one delegate is executed successfully,
now the process stops on a user task,
when I complete the user task programatically, then it is unable to find the next delegate bean.

What should I do in this case?

faizal-manan
Champ in-the-making
Champ in-the-making
Hi,
Can you confirm courseWorkflowRequestDraftedServiceTask bean is properly loaded on your webapp?