package cn.stylefeng.workflow.event.modular.eventconsumer;

import cn.stylefeng.workflow.api.pojo.InstanceContext;
import cn.stylefeng.workflow.event.api.BaseEventConsumer;
import org.springframework.stereotype.Service;

@Service
public class SleepTenEventConsumer implements BaseEventConsumer {

    @Override
    public void consumerAction(Long nodeId, InstanceContext instanceContext) {
        System.out.println("这是一个睡眠10秒的监听事件，用来模拟外部业务执行了10秒");
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
        }
    }
}
