提交 6bf286a5 编写于 作者: L lenboo

fix critical bugs

上级 7452c3a7
...@@ -111,8 +111,8 @@ public class StateEventResponseService { ...@@ -111,8 +111,8 @@ public class StateEventResponseService {
// if not task , blocking here // if not task , blocking here
StateEvent stateEvent = eventQueue.take(); StateEvent stateEvent = eventQueue.take();
persist(stateEvent); persist(stateEvent);
} catch (Exception e) { } catch (InterruptedException e) {
logger.error("persist task error", e); logger.warn("persist task error", e);
} }
} }
logger.info("StateEventResponseWorker stopped"); logger.info("StateEventResponseWorker stopped");
...@@ -128,14 +128,18 @@ public class StateEventResponseService { ...@@ -128,14 +128,18 @@ public class StateEventResponseService {
} }
private void persist(StateEvent stateEvent) { private void persist(StateEvent stateEvent) {
if (!this.processInstanceMapper.containsKey(stateEvent.getProcessInstanceId())) { try {
writeResponse(stateEvent, ExecutionStatus.FAILURE); if (!this.processInstanceMapper.containsKey(stateEvent.getProcessInstanceId())) {
return; writeResponse(stateEvent, ExecutionStatus.FAILURE);
} return;
}
WorkflowExecuteThread workflowExecuteThread = this.processInstanceMapper.get(stateEvent.getProcessInstanceId()); WorkflowExecuteThread workflowExecuteThread = this.processInstanceMapper.get(stateEvent.getProcessInstanceId());
workflowExecuteThread.addStateEvent(stateEvent); workflowExecuteThread.addStateEvent(stateEvent);
writeResponse(stateEvent, ExecutionStatus.SUCCESS); writeResponse(stateEvent, ExecutionStatus.SUCCESS);
} catch (Exception e) {
logger.error("persist event queue error:", stateEvent.toString(), e);
}
} }
public BlockingQueue<StateEvent> getEventQueue() { public BlockingQueue<StateEvent> getEventQueue() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册