I am creating a first automated activity "back to author" in workflow using coreservice. The below is my code.
- created component and finished
- reviewed the component and chose "back to author" this is an automated task, for that I have written the below code. But the activity is not performed.
can you please help me on this?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Tridion.ContentManager.CoreService.Client;
namespace CoreComponentWorkflow
{
[ProgId("CoreComponentWorkflow.WorkflowHandler")]
public class AutomaticWorkflowHandler
{
public void MoveBackToActivity(string strActivitytoMove)
{
var client = new SessionAwareCoreServiceClient();
var finishdata = new ActivityFinishData();
finishdata.Message = strActivitytoMove;
var process = new ProcessInstanceData();
var activity = (ActivityInstanceData)process.Activities[0];
client.FinishActivity(activity.Id, finishdata, new ReadOptions());
}
}
}