using System.Collections.Generic;
namespace APT.BaseData.Domain.ApiModel
{
    public class FlowRuntimeModel
    {
        /// 
        /// 运行实例的Id
        /// 
        public string flowInstanceId { get; set; }
        /// 
        /// 开始节点的ID
        /// 
        public string startNodeId { get; set; }
        /// 
        /// 当前节点的ID
        /// 
        public string currentNodeId { get; set; }
        /// 
        /// 当前节点类型 0会签开始,1会签结束,2一般节点,开始节点,4流程运行结束
        /// 
        public int currentNodeType { get; set; }
        /// 
        /// 当前节点的对象
        /// 
        public FlowNode currentNode { get { return nodes[currentNodeId]; } }
        /// 
        /// 下一个节点
        /// 
        public string nextNodeId { get; set; }
        /// 
        /// 下一个节点类型 -1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束
        /// 
        /// The type of the next node.
        public int nextNodeType { get; set; }
        /// 
        /// 下一个节点对象
        /// 
        public FlowNode nextNode { get
            {
                if (nextNodeId != "-1")
                    return nodes[nextNodeId];
                else
                    return null;
            } 
        }
        /// 
        /// 上一个节点
        /// 
        public string previousId { get; set; }
        /// 
        /// 实例节点集合
        /// 
        public Dictionary nodes { get; set; }
        /// 
        /// 流转的线段集合
        /// 
        public Dictionary> lines { get; set; }
        /// 
        /// 模板json数据
        /// 
        public dynamic schemeContentJson { get; set; }
        /// 
        /// 表单数据
        /// 
        public string frmData { get; set; }
    }
}