我試圖設置org.activiti.engine.impl.bpmn.listener.ScriptTaskListener
的autoStoreVariables
字段。如何在activiti中設置布爾型字段
這是包含taskListener
的userTask
。
<userTask id="WorkJob.task" name="WorkJob.task" activiti:assignee="${assignee}" activiti:dueDate="${dueDate}">
<extensionElements>
<activiti:taskListener event="create" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener" >
<activiti:field name="autoStoreVariables" expression="${true}"/>
<activiti:field name="script" stringValue="${out:print('hello world')}"/>
<activiti:field name="language" stringValue="juel" />
</activiti:taskListener>
</extensionElements>
</userTask>
得到以下錯誤:
org.activiti.engine.ActivitiIllegalArgumentException: Incompatible type set on field declaration 'autoStoreVariables' for class org.activiti.engine.impl.bpmn.listener.ScriptTaskListener. Declared value has type org.activiti.engine.impl.el.JuelExpression, while expecting boolean
我嘗試沒有成功如下:
<activiti:field name="autoStoreVariables" booleanValue="true"/>
<activiti:field name="autoStoreVariables" stringValue="true"/>
<activiti:field name="autoStoreVariables" expression="true"/>
什麼是設置boolean
場的正確方法是什麼?