using System.Threading.Tasks;
namespace Serein.Library.Api
{
///
/// 流程运行接口
///
public interface IFlowControl
{
///
/// 需要你提供一个由你实现的ISereinIOC接口实现类
/// 当你将流程运行环境集成在你的项目时,并希望流程运行时使用你提供的对象,而非自动创建
/// 就需要你调用这个方法,用来替换运行环境的IOC容器
/// 注意,是流程运行时,而非运行环境
///
///
void UseExternalIOC(ISereinIOC ioc);
///
/// 开始运行流程
///
/// 需要运行的流程Guid
///
Task StartFlowAsync(string[] canvasGuids);
///
/// 从选定的节点开始运行
///
///
///
Task StartFlowFromSelectNodeAsync(string startNodeGuid);
///
/// 结束运行
///
Task ExitFlowAsync();
///
/// 激活未启动的全局触发器
///
///
void ActivateFlipflopNode(string nodeGuid);
///
/// 终结一个全局触发器,在它触发后将不会再次监听消息(表现为已经启动的触发器至少会再次处理一次消息,后面版本再修正这个非预期行为)
///
///
void TerminateFlipflopNode(string nodeGuid);
///
/// 流程启动器调用,监视数据更新通知
///
/// 更新了数据的节点Guid
/// 更新的数据
/// 更新的数据
void MonitorObjectNotification(string nodeGuid, object monitorData, MonitorObjectEventArgs.ObjSourceType sourceType);
///
/// 流程启动器调用,节点触发了中断
///
/// 被中断的节点Guid
/// 被触发的表达式
/// 中断类型。0主动监视,1表达式
void TriggerInterrupt(string nodeGuid, string expression, InterruptTriggerEventArgs.InterruptTriggerType type);
}
}