Message Boards

groovy.lang.MissingPropertyException: No such property: workflowContext

Christian Sperlich, modified 8 Years ago.

groovy.lang.MissingPropertyException: No such property: workflowContext

New Member Posts: 10 Join Date: 10/31/12 Recent Posts
Hi everybody,

I'm just learning howto use Workflows with Liferay. We've change the Default Kaleo Engine to Acitiviti-Plugin (Version 6.2.18.1) and the Engine is working fine.

So my firtst test is a very simple approver workflow where I want to set the workflow Status via script Task. My Groovy-Script Looks like this:


import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.STATUS_DENIED, workflowContext);


When this Script Task is running the following exception is thrown:
javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: workflowContext for class: Script1

I thought that workflowContext is an implizit variable like execution.

Thanks for your help!