コード例 #1
0
 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);
         }
     });
 }
コード例 #2
0
 public void Handle(TaskControlCommand message)
 {
     MessageBusUtil.ShareDbConnection(DbSessionFactory, () => _pr.DeliverTaskControlMessage(message));
 }
コード例 #3
0
 protected void DeliverControlMessage(TaskControlCommand msg)
 {
     _runner.DeliverTaskControlMessage(msg);
 }