Class ThreadRobotIdleTimeoutServiceDelegate

java.lang.Object
com.bytedesk.ticket.thread.delegate.ThreadRobotIdleTimeoutServiceDelegate
All Implemented Interfaces:
org.flowable.engine.delegate.JavaDelegate

@Component("threadRobotIdleTimeoutServiceDelegate") public class ThreadRobotIdleTimeoutServiceDelegate extends Object implements org.flowable.engine.delegate.JavaDelegate
机器人接待访客超时服务 处理访客在机器人接待过程中长时间未发送消息的情况 - 记录超时信息 - 发送超时提醒 - 结束会话
  • Field Details

  • Constructor Details

    • ThreadRobotIdleTimeoutServiceDelegate

      public ThreadRobotIdleTimeoutServiceDelegate()
  • Method Details

    • execute

      public void execute(org.flowable.engine.delegate.DelegateExecution execution)
      Specified by:
      execute in interface org.flowable.engine.delegate.JavaDelegate
    • isReallyTimedOut

      private boolean isReallyTimedOut(org.flowable.engine.delegate.DelegateExecution execution)
      检查是否真的超时 考虑访客最后活动时间,如果访客在超时时间内有新消息,则不应判定为超时
      Parameters:
      execution - 流程执行上下文
      Returns:
      如果真的超时,返回true;否则返回false
    • markThreadAsTimeout

      private void markThreadAsTimeout(String threadUid)
      标记会话为超时状态