我能够在工作流用户任务中访问“任务”对象。
<userTask id="usertask1" name="Manager Approval" activiti:candidateGroups="GROUP_ALFRESCO_MANAGERS" activiti:formKey="tcdr:managerForDeleteApproval">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
logger.log(task.getName());
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
我无法在工作流服务任务中访问“任务”对象, 它给出了“未定义任务”的错误。
<serviceTask id="scripttask2" name="Submit" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
<extensionElements>
<activiti:field name="script">
<activiti:string><![CDATA[
logger.log(task.getName());
]]></activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
答案 0 :(得分:1)
尝试使用select top 100 p.ID, dtp.Phrase,
(
select sdt.DocText
from mytable sdt
where sdt.Doctextid = dt.doctextid ) as DocText
from table1 p
left join table2 d on d.PropertyId = p.PropertyId
left join table3 dt on dt.DocumentId = d.DocumentId
left join table4 dtm on dtm.DocumentTextId = dt.DocumentTextId
left join table5 dtp on dtm.DocumentTypePhraseId = dtp.DocumentTypePhraseId
where p.ID in ('1053468')
代替execution
,我遇到了与startTask相同的问题,但我不确定它是否适用于seviceTask