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());
}
}
}