How can I resolve identifier of the processvariable from a conditionExpression in Spring Module?

4,778 views
Skip to first unread message

kpmg.t...@gmail.com

unread,
Jan 3, 2015, 1:43:01 AM1/3/15
to camunda-...@googlegroups.com
Hi everyone,

I use Camunda in combination with spring framework and i want to access process variables „inside“ the process, ie. from a sequence flow running out of the exclusive Gateway.

I complete the firstactivity through the Spring Taskservice after that I have a XOR Gateway with this definition in the BPMN File:

<sequenceFlow id="sid-FF7C3537-09BF-455E-BA9F-19D7FA84652C" name="nein" sourceRef="sid-0F95555D-2E7E-4278-A7E2-1D6BC8EC2C17" targetRef="sid-EEB0AB69-C9F3-4C97-B91A-061BD6E6967C">
<conditionExpression xsi:type="tFormalExpression">${checkIncomeTaxAppreciation=='Nein'}</conditionExpression>
</sequenceFlow>


After i complete the first activity the spring Engine can not perform the XOR Gateway (Sequence Flow) and the process will be interupted. I get the folowing exception :


WARNUNG: #{taskListBean.completeTask()}: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${checkIncomeTaxAppreciation=='Nein'}. Cause: Cannot resolve identifier 'checkIncomeTaxAppreciation'
javax.faces.FacesException: #{taskListBean.completeTask()}: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${checkIncomeTaxAppreciation=='Nein'}. Cause: Cannot resolve identifier 'checkIncomeTaxAppreciation'
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:117)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.kpmg.gbc.application.core.CacheFilter.doFilter(CacheFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.faces.el.EvaluationException: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${checkIncomeTaxAppreciation=='Nein'}. Cause: Cannot resolve identifier 'checkIncomeTaxAppreciation'
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
... 32 more
Caused by: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${checkIncomeTaxAppreciation=='Nein'}. Cause: Cannot resolve identifier 'checkIncomeTaxAppreciation'
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55)
at org.camunda.bpm.engine.impl.el.UelExpressionCondition.evaluate(UelExpressionCondition.java:37)
at org.camunda.bpm.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.leave(ExclusiveGatewayActivityBehavior.java:63)
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:63)
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:54)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:73)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:117)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:93)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:728)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:719)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:525)
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102)
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51)
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47)
at org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:108)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:508)
at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:170)
at org.camunda.bpm.engine.impl.cmd.CompleteTaskCmd.completeTask(CompleteTaskCmd.java:62)
at org.camunda.bpm.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:56)
at org.camunda.bpm.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:27)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:90)
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:159)
at com.kpmg.gbc.controller.jsfbeans.TaskListBean.completeTask(TaskListBean.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 33 more
Caused by: org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'checkIncomeTaxAppreciation'
at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
at org.camunda.bpm.engine.impl.juel.AstBinary$SimpleOperator.eval(AstBinary.java:27)
at org.camunda.bpm.engine.impl.juel.AstBinary.eval(AstBinary.java:106)
at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:39)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:42)
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
... 97 more




the condition of a sequence flow is not performed. the Spring Engine can not access to the processvariablename. When I Complete the activity inside the CDI Module. I can access to the ProcessVariable Name and the Engine in combination with CDI can perform the Sequence Flow . In SPring I have this problem.


Can you please tell me, how from the processmodel can I access to the Processvariable in combination with Spring?`


Thanks in advance for the response.

Marcel

Christian Lipphardt

unread,
Jan 3, 2015, 5:55:20 AM1/3/15
to camunda-...@googlegroups.com
Hi Marcel,

Please check the Camunda + Spring tutorial[1]. See [2] if you use Spring and the Camunda shared process engine approach.
Make sure to include the camunda-engine-spring dependency to your maven project and the necessary configurations are done correctly like in the tutorial.
Also make sure the spring bean is properly initialized by spring.


--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/eaf390fd-62ba-40e9-9a4b-4c2be99c522f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kpmg.t...@gmail.com

unread,
Jan 5, 2015, 10:57:22 AM1/5/15
to camunda-...@googlegroups.com
Hi Christian,

thanks for Replying. I run the Spring example from the camunda Site.
the Spring Bean is properly initialized by spring.
But my problem is that i try to build a Spring, JSF , Hibernate Application
with a tasklist inside my Application. I dont use the CDI Engine to complete my Task in my application, but i use the Spring Engine.

For example in my JSF: "taskListBean.completeTask()" Call the completeTask from the Spring Bean Taskservice.


<p class="formLabel">
<label for="name">Ist die ertragsteuerliche Versteuerung korrekt?</label></p>
<h:selectOneMenu value="#{processVariables['checkIncomeTaxAppreciation']}" required="true">
<f:selectItem itemLabel="Ja" itemValue="Ja" />
<f:selectItem itemLabel="Nein" itemValue="Nein" />
</h:selectOneMenu>

<p class="formLabel"><label for="name">Kommentar des Prüfers</label></p>
<h:inputTextarea id="checkIncomeTaxAppreciationComment"
value="#{processVariables['checkIncomeTaxAppreciationComment']}" cols="30" rows="10"/>

<br></br>
<f:facet name="footer">
<h:panelGroup style="display:block; text-align:left">
<h:commandButton styleClass="buttom" id="submit_button" value="Aufgabe
erledigen" action="#{taskListBean.completeTask()}"/>
</h:panelGroup>
</f:facet>
</h:panelGrid>



In my TasklistBean: this Method will be called. "taskService.complete(taskId)". (The TaskId will be get from the requestparameter)


My Problem ist that the condition Processvariable set in the JSF : "#{processVariables['checkIncomeTaxAppreciation']} and defined in my processmodel will not be resolved by the Spring Engine. The Property is unknow from the engine and the Sequenceflow can not be performed.


With the CDI Engine., when i compete the task through "taskform.completeTask()"
all processvariable set in JSF will be recognized from the engine and the sequenceflow will be perfomed. My Question:

Can i build in my J2EE Application my own tasklist with Spring and JSF ? or I have to follow the approach CDI, JSF, EJB and JPA.

thanks and Cheers.

Marcel

mojtaba shayegh

unread,
Jan 10, 2015, 11:07:01 AM1/10/15
to camunda-...@googlegroups.com, kpmg.t...@gmail.com
Hi,
I have the same problem please somebody help,
Reply all
Reply to author
Forward
0 new messages