2016-11-08 4 views
0

スタートフォームの値をテキストフィールドに設定するカスタム実行リスナを作成します。また、私は人々のリストに電子メールを送信する必要があります。私はワークフローに実行要素を追加した場合しかし、私は例外をキャッチ:Alfresco bpmn custom executionListener

<b>org.springframework.extensions.webscripts.WebScriptException - 10080001 Script url /api/workflow/activiti$LegalDocFlow/formprocessor does not support the method GET</b>

私は唯一の拡張要素をBPMNに追加:

<process id="LegalDocFlow" isClosed="false" isExecutable="true" name="LegalProcessSchema" processType="None"> 
 
     <extensionElements> 
 
      <activiti:executionListener event="start" activiti:delegateExpression="${StartListener}"/> 
 
      <activiti:executionListener event="end" activiti:delegateExpression="${EndListener}"/> 
 
     </extensionElements> 
 
....

マイリスナーは次のようになります。

import org.activiti.engine.delegate.DelegateExecution; 
import org.activiti.engine.delegate.ExecutionListener; 
import org.alfresco.repo.workflow.activiti.script.DelegateExecutionScriptBase; 
import org.apache.commons.logging.Log; 
import org.apache.commons.logging.LogFactory; 
import org.springframework.stereotype.Component; 

@Component("StartListener") 
public class StartListener implements ExecutionListener { 
    private static Log logger = LogFactory.getLog(StartListener.class); 

    public void notify(DelegateExecution execution) throws Exception { 
     System.out.println("CreateListener"); 
    } 
} 

ワット私は間違っていますか?

答えて

0

私はstartEventにリスナーを置き換える:

<startEvent id="alfrescoStartevent1" name="Alfresco start" activiti:formKey="dfrwr:startProcesstask" > 
     <extensionElements> 
      <activiti:executionListener event="start" class="${StartListener}"/> 
      <activiti:executionListener event="end" class="${EndListener}"/> 
     </extensionElements> 
    </startEvent> 

そして、それは仕事です!