|
@@ -0,0 +1,28 @@
|
|
|
+package com.jeeplus.modules.sg.managementcenter.activiti.utils;
|
|
|
+
|
|
|
+import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
|
|
|
+import org.activiti.engine.delegate.DelegateExecution;
|
|
|
+import org.activiti.engine.delegate.ExecutionListener;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+
|
|
|
+import java.beans.Expression;
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+public class EndTaskListen implements Serializable, ExecutionListener {
|
|
|
+ /**
|
|
|
+ * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
|
|
+ */
|
|
|
+ private static final long serialVersionUID = 8513750196548027535L;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ProjectService projectService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void notify(DelegateExecution delegateExecution) throws Exception {
|
|
|
+ System.out.println("status");
|
|
|
+ System.out.println("procinsId");
|
|
|
+ String processInstanceId = delegateExecution.getProcessInstanceId();
|
|
|
+ System.out.println(processInstanceId);
|
|
|
+ projectService.updateStatusBy("2", processInstanceId);
|
|
|
+ }
|
|
|
+}
|