[英]How to generate an empty bpm:comment box in Alfresco Activiti Workflow Task?
[英]Alfresco Activiti BPM dynamically get candidate groups or users
是否可以在Activiti中動態定義candidateGroups
或candidateUsers
? 我想做這樣的事情:
<userTask id="approve" name="approve" activiti:candidateUsers="${myWorkflowService.getCandidateUsers()}"></userTask>
然后在Java類MyWorkflowService
,我將定義方法getCandidateUsers()
以返回用戶/組的列表。
我設法解決是這樣的:
我在該userTasK之前的過渡中添加了executionListener
:
<activiti:executionListener event="start" expression="${myWorkflowService.getCandidateUsers(execution)}"></activiti:executionListener>
在我的課堂上,我定義了這個方法:
public void getCandidateUsers(DelegateExecution execution) { execution.setVariable("approver", "foo"); }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.