internal void DeliverTaskControlMessage(TaskControlCommand tcm) { RunProcessTransaction(this.DefaultPersistenceMode, ps => { if (tcm is EnableChildTask) { EnableChildTask(tcm as EnableChildTask); return; } else if (tcm is CancelTask) { CancelTask(tcm.ToTaskInstanceId, ""); return; } else if (tcm is SelectTask) { SelectTask(tcm.ToTaskInstanceId); return; } else if (tcm is FailTask) { this.ForceFailTask(tcm.ToTaskInstanceId, ((FailTask)tcm).ErrorInfo); return; } else if (tcm is ForceCompleteTask) { this.ForceCompleteTask(tcm.ToTaskInstanceId, ((ForceCompleteTask)tcm).UpdateData); return; } else { throw new NotImplementedException(tcm.GetType().Name); } }); }
public void Handle(TaskControlCommand message) { MessageBusUtil.ShareDbConnection(DbSessionFactory, () => _pr.DeliverTaskControlMessage(message)); }
protected void DeliverControlMessage(TaskControlCommand msg) { _runner.DeliverTaskControlMessage(msg); }