/// <summary>
 /// イベント名(文字列)からイベントを実行する
 /// </summary>
 /// <param name="workflowEvent"></param>
 public void FireWorkflowEvent(Container context, string workflowEvent, object param)
 {
     try
     {
         var events = Events.ForName(workflowEvent);
         mWorkflow.Fire(events, param);
     }
     catch (Exception expr)
     {
         mLogger.Error(expr, "[FireWorkflowEvent] Event Not Found (EventName={EventName}).", workflowEvent);
     }
 }
Example #2
0
 /// <summary>
 /// イベント名(文字列)からイベントを実行する
 /// </summary>
 /// <param name="workflowEvent"></param>
 public void FireWorkflowEvent(Container context, string workflowEvent, object param)
 {
     try
     {
         var events = Events.ForName(workflowEvent);
         mWorkflow.Fire(events, param);
     }
     catch (Exception expr)
     {
         Console.WriteLine("イベントが見つかりません " + expr.Message);
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Start Application");

            var statemachine = new CategoryTreeTransitionWorkflow();

            statemachine.Setup();
            statemachine.Start();

            Console.WriteLine("End StartUp");


            Console.WriteLine("Fire TRNS_TOPSCREEN");
            statemachine.Fire(Events.TRNS_TOPSCREEN, null);

            Thread.Sleep(1000 * 1);

            Console.WriteLine("Fire TRNS_BACK");
            statemachine.Fire(Events.TRNS_BACK, null);

            Thread.Sleep(1000 * 1);

            Console.WriteLine("End Application");
        }