cancel
Showing results for 
Search instead for 
Did you mean: 

process variable vs. condition expression

larsson7
Champ in-the-making
Champ in-the-making
Hello all,

ich have a question about sequence flows and process variables. I have a process with a script task just after the start event. In the script task i define the process variable outputTransition that can get the value "approved" or "denied". After the script task, an exclusive gateway splits the process. And now i want to discribe the two sequence flows out of the gateway. If the process variable is "approved" it the process should go right if it is "denied" left.

But i get the following error:


Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus(outputTransition), workflowContext);
06:58:38,253 ERROR [http-bio-8080-exec-3][render_portlet_jsp:154] org.activiti.engine.ActivitiException: Unknown property used in expression
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55)
   at org.activiti.engine.impl.el.UelExpressionCondition.evaluate(UelExpressionCondition.java:37)
   at org.activiti.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.leave(ExclusiveGatewayActivityBehavior.java:63)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'outputTransition'

Can i use process variables in a flow expression and how? Can i declare a property in a script task so i can use it in a flow expression?

Can someone please help?!

Thanks all 🙂

Best regards, Philipp
11 REPLIES 11

larsson7
Champ in-the-making
Champ in-the-making
Hey,

thanks, i know this page. I studied days ago but it doesn´t help in special questions..
Easy workflows with just a approve and a small script task, ok but more complex workflows…
They are still developing the Activiti / Liferay integration and the documentation isn´t very good.

No good news today..

iam
Champ in-the-making
Champ in-the-making
@Larsson7,
When you set any variable in script task, this variable is available in process instance.
You can set it in one task and use in other. It's not necessary to use setter execution.setVariable() in the script task.