Skip to main content
Tweeted twitter.com/#!/StackTridion/status/445152324923977728
added 73 characters in body
Source Link
Jey
  • 911
  • 4
  • 13

I have a manual activity first and then 2nd activity is an automatic decision activity. I have written a C# class library and uploaded in TCM as TBB. In my automatic decision activity, I have provided the code as below in the Edit script.

AssemblyTbbId = "/webdav/xyx/myworkflow.tbbasm"
Type = "myworkflow.myclass"

And below is the code in my TBB. I am getting the error below and log is also not created in the TCM server.

Tridion.ContentManager.Workflow.WorkflowEngineException: Activity instance '2. Super User?' (tcm:2-32-131104) must be in 'Finished' state after script

log is also not created in the TCM server. Do i need to register the dll in TCM? I just uploaded in TCM only.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tridion.ContentManager;
using Tridion.ContentManager.CoreService.Client;
using Tridion.ContentManager.CoreService.Workflow;

namespace myworkflow
{
public class myclass : ExternalActivity
{        
    protected override void Execute()
    {
        logdetails("Inside checkSuperUser method");
        SessionAwareCoreServiceClient cSclient = new SessionAwareCoreServiceClient();
        ActivityInstanceData currentActivityInstance = cSclient.Read(ActivityInstance.Id, new ReadOptions()) as ActivityInstanceData;
        Boolean isSuperUser = GetLastPermformerIdofCreateAndEdit(currentActivityInstance);
        ActivityFinishData finishActivity = new ActivityFinishData();
        
        if (isSuperUser)
        {
            
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Approver";                
        }
        else
        {
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Editor";
        }
        cSclient.FinishActivity(currentActivityInstance.Id, finishActivity, new ReadOptions());
    }        
    }
    }

I have a manual activity first and then 2nd activity is an automatic decision activity. I have written a C# class library and uploaded in TCM as TBB. In my automatic decision activity, I have provided the code as below in the Edit script.

AssemblyTbbId = "/webdav/xyx/myworkflow.tbbasm"
Type = "myworkflow.myclass"

And below is the code in my TBB. I am getting the error below and log is also not created in the TCM server.

Tridion.ContentManager.Workflow.WorkflowEngineException: Activity instance '2. Super User?' (tcm:2-32-131104) must be in 'Finished' state after script

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tridion.ContentManager;
using Tridion.ContentManager.CoreService.Client;
using Tridion.ContentManager.CoreService.Workflow;

namespace myworkflow
{
public class myclass : ExternalActivity
{        
    protected override void Execute()
    {
        logdetails("Inside checkSuperUser method");
        SessionAwareCoreServiceClient cSclient = new SessionAwareCoreServiceClient();
        ActivityInstanceData currentActivityInstance = cSclient.Read(ActivityInstance.Id, new ReadOptions()) as ActivityInstanceData;
        Boolean isSuperUser = GetLastPermformerIdofCreateAndEdit(currentActivityInstance);
        ActivityFinishData finishActivity = new ActivityFinishData();
        
        if (isSuperUser)
        {
            
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Approver";                
        }
        else
        {
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Editor";
        }
        cSclient.FinishActivity(currentActivityInstance.Id, finishActivity, new ReadOptions());
    }        
    }
    }

I have a manual activity first and then 2nd activity is an automatic decision activity. I have written a C# class library and uploaded in TCM as TBB. In my automatic decision activity, I have provided the code as below in the Edit script.

AssemblyTbbId = "/webdav/xyx/myworkflow.tbbasm"
Type = "myworkflow.myclass"

And below is the code in my TBB. I am getting the error below.

Tridion.ContentManager.Workflow.WorkflowEngineException: Activity instance '2. Super User?' (tcm:2-32-131104) must be in 'Finished' state after script

log is also not created in the TCM server. Do i need to register the dll in TCM? I just uploaded in TCM only.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tridion.ContentManager;
using Tridion.ContentManager.CoreService.Client;
using Tridion.ContentManager.CoreService.Workflow;

namespace myworkflow
{
public class myclass : ExternalActivity
{        
    protected override void Execute()
    {
        logdetails("Inside checkSuperUser method");
        SessionAwareCoreServiceClient cSclient = new SessionAwareCoreServiceClient();
        ActivityInstanceData currentActivityInstance = cSclient.Read(ActivityInstance.Id, new ReadOptions()) as ActivityInstanceData;
        Boolean isSuperUser = GetLastPermformerIdofCreateAndEdit(currentActivityInstance);
        ActivityFinishData finishActivity = new ActivityFinishData();
        
        if (isSuperUser)
        {
            
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Approver";                
        }
        else
        {
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Editor";
        }
        cSclient.FinishActivity(currentActivityInstance.Id, finishActivity, new ReadOptions());
    }        
    }
    }
Source Link
Jey
  • 911
  • 4
  • 13

Automatic Work activity failed in Tridion 2013 Workflow uses external activity

I have a manual activity first and then 2nd activity is an automatic decision activity. I have written a C# class library and uploaded in TCM as TBB. In my automatic decision activity, I have provided the code as below in the Edit script.

AssemblyTbbId = "/webdav/xyx/myworkflow.tbbasm"
Type = "myworkflow.myclass"

And below is the code in my TBB. I am getting the error below and log is also not created in the TCM server.

Tridion.ContentManager.Workflow.WorkflowEngineException: Activity instance '2. Super User?' (tcm:2-32-131104) must be in 'Finished' state after script

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tridion.ContentManager;
using Tridion.ContentManager.CoreService.Client;
using Tridion.ContentManager.CoreService.Workflow;

namespace myworkflow
{
public class myclass : ExternalActivity
{        
    protected override void Execute()
    {
        logdetails("Inside checkSuperUser method");
        SessionAwareCoreServiceClient cSclient = new SessionAwareCoreServiceClient();
        ActivityInstanceData currentActivityInstance = cSclient.Read(ActivityInstance.Id, new ReadOptions()) as ActivityInstanceData;
        Boolean isSuperUser = GetLastPermformerIdofCreateAndEdit(currentActivityInstance);
        ActivityFinishData finishActivity = new ActivityFinishData();
        
        if (isSuperUser)
        {
            
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Approver";                
        }
        else
        {
            finishActivity.Message = currentActivityInstance.FinishMessage;
            finishActivity.NextActivityTitle = "Editor";
        }
        cSclient.FinishActivity(currentActivityInstance.Id, finishActivity, new ReadOptions());
    }        
    }
    }