【问题标题】:Alfresco bpmn custom executionListenerAlfresco bpmn 自定义执行监听器
【发布时间】:2016-11-08 06:36:01
【问题描述】:

我想创建自定义执行侦听器以在开始表单上为文本字段设置值。我还需要向人员列表发送电子邮件。但是当我将执行元素添加到工作流时,我会捕获异常:

<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");
    }
}

我做错了吗?

【问题讨论】:

    标签: workflow alfresco activiti


    【解决方案1】:

    我将监听器替换为 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>
    

    它的工作!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-19
      • 2017-02-18
      • 2011-12-24
      • 2011-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多