Skip to main content
deleted 3 characters in body
Source Link
Marko Milic
  • 8.9k
  • 3
  • 24
  • 60

I'm making workflow on Tridion 2013 SP1, but when I start workflow, automatic activity fails.

I made a simple workflow that has only 2 activities. 1st one is a manual acitivityactivity and 2nd one is an automatic activity. The automatic activity source code is following  (it only outputs text to a file "WorkflowFailure.log").

 class Activity1 : ExternalActivity
    {
        protected override void Execute()
        {
            outputlog("Activity1 start:" + ProcessInstance.Title);
            System.Threading.Thread.Sleep(5000); 
            CoreServiceClient.FinishActivity(ActivityInstance.Id, new ActivityFinishData { Message = "Finished" }, null);                          
        }
        public static void outputlog(string msg)
        {
            StreamWriter sw = new StreamWriter("C:\\tridion\\log-custom\\WorkflowFailure.log", true, System.Text.Encoding.UTF8);
            sw.WriteLine(DateTime.Now.ToString("yyyyMMdd hh:mm:ss:fff") + ":" + msg);
            sw.Close();
        }
    }

This automatic activity often fails, but it has very weired symptom.

  1. When I start same workflow again and again, sometimes it succeeds and sometimes it fails.
  2. When it fails, no log is output to Windows eventlog, and any Tridion log file.
  3. When it fails, no text is output to "WorkflowFailure.log"  (This file is made by above above automatic activity).

BecuaseBecause of 3rd symptom, I guess automatic activity itself is not called.

Does anyone know same issue?

What is problem?

I'm making workflow on Tridion 2013 SP1, but when I start workflow, automatic activity fails.

I made a simple workflow that has only 2 activities. 1st one is a manual acitivity and 2nd one is an automatic activity. The automatic activity source code is following(it only outputs text to a file "WorkflowFailure.log").

 class Activity1 : ExternalActivity
    {
        protected override void Execute()
        {
            outputlog("Activity1 start:" + ProcessInstance.Title);
            System.Threading.Thread.Sleep(5000); 
            CoreServiceClient.FinishActivity(ActivityInstance.Id, new ActivityFinishData { Message = "Finished" }, null);                          
        }
        public static void outputlog(string msg)
        {
            StreamWriter sw = new StreamWriter("C:\\tridion\\log-custom\\WorkflowFailure.log", true, System.Text.Encoding.UTF8);
            sw.WriteLine(DateTime.Now.ToString("yyyyMMdd hh:mm:ss:fff") + ":" + msg);
            sw.Close();
        }
    }

This automatic activity often fails, but it has very weired symptom.

  1. When I start same workflow again and again, sometimes it succeeds and sometimes it fails.
  2. When it fails, no log is output to Windows eventlog, and any Tridion log file.
  3. When it fails, no text is output to "WorkflowFailure.log"(This file is made by above automatic activity).

Becuase of 3rd symptom, I guess automatic activity itself is not called.

Does anyone know same issue?

What is problem?

I'm making workflow on Tridion 2013 SP1, but when I start workflow, automatic activity fails.

I made a simple workflow that has only 2 activities. 1st one is a manual activity and 2nd one is an automatic activity. The automatic activity source code is following  (it only outputs text to a file "WorkflowFailure.log").

 class Activity1 : ExternalActivity
    {
        protected override void Execute()
        {
            outputlog("Activity1 start:" + ProcessInstance.Title);
            System.Threading.Thread.Sleep(5000); 
            CoreServiceClient.FinishActivity(ActivityInstance.Id, new ActivityFinishData { Message = "Finished" }, null);                          
        }
        public static void outputlog(string msg)
        {
            StreamWriter sw = new StreamWriter("C:\\tridion\\log-custom\\WorkflowFailure.log", true, System.Text.Encoding.UTF8);
            sw.WriteLine(DateTime.Now.ToString("yyyyMMdd hh:mm:ss:fff") + ":" + msg);
            sw.Close();
        }
    }

This automatic activity often fails, but it has very weired symptom.

  1. When I start same workflow again and again, sometimes it succeeds and sometimes it fails.
  2. When it fails, no log is output to Windows eventlog, and any Tridion log file.
  3. When it fails, no text is output to "WorkflowFailure.log"  (This file is made by above automatic activity).

Because of 3rd symptom, I guess automatic activity itself is not called.

Does anyone know same issue?

What is problem?

Tweeted twitter.com/#!/StackTridion/status/492197492424179712
Source Link

Workflow automatic activity fails by unknown reason

I'm making workflow on Tridion 2013 SP1, but when I start workflow, automatic activity fails.

I made a simple workflow that has only 2 activities. 1st one is a manual acitivity and 2nd one is an automatic activity. The automatic activity source code is following(it only outputs text to a file "WorkflowFailure.log").

 class Activity1 : ExternalActivity
    {
        protected override void Execute()
        {
            outputlog("Activity1 start:" + ProcessInstance.Title);
            System.Threading.Thread.Sleep(5000); 
            CoreServiceClient.FinishActivity(ActivityInstance.Id, new ActivityFinishData { Message = "Finished" }, null);                          
        }
        public static void outputlog(string msg)
        {
            StreamWriter sw = new StreamWriter("C:\\tridion\\log-custom\\WorkflowFailure.log", true, System.Text.Encoding.UTF8);
            sw.WriteLine(DateTime.Now.ToString("yyyyMMdd hh:mm:ss:fff") + ":" + msg);
            sw.Close();
        }
    }

This automatic activity often fails, but it has very weired symptom.

  1. When I start same workflow again and again, sometimes it succeeds and sometimes it fails.
  2. When it fails, no log is output to Windows eventlog, and any Tridion log file.
  3. When it fails, no text is output to "WorkflowFailure.log"(This file is made by above automatic activity).

Becuase of 3rd symptom, I guess automatic activity itself is not called.

Does anyone know same issue?

What is problem?