package com.cmvr.test.flow.runtime.message;

import com.cmvr.test.flow.builder.FlowGraph;
import com.cmvr.test.flow.builder.FlowNodeWrapper;
import com.cmvr.test.flow.builder.FlowParamDef;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 节点执行上下文，用于保存线程与流程信息
 */
@Data
public class TaskNodeExecuteContext {
    private Thread thread;

    private FlowGraph graph;
    private FlowNodeWrapper node;
    private String startNodeId;
    private List<FlowParamDef> startInputDefs;
    private TaskNodeExecuteMessage rootMessage;
    private Runnable onFinished;
    private int loopIteration;
    private Object loopArray;
    private List<Integer> iterations = new ArrayList<>();
}
