Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8236991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:19:13+00:00 2026-06-07T19:19:13+00:00

I am trying to decide the next activity from the current activity (Automatic decision

  • 0

I am trying to decide the next activity from the current activity (Automatic decision activity)The below is my code. How to set the next activity?

public void DebugUserCheck(string workitemid)
{
  CoreServiceSession client = new CoreServiceSession();
  SessionAwareCoreServiceClient csClient = client.GetClient();
  var readoption = new ReadOptions();
  WorkItemData workitem = (WorkItemData)csClient.Read(workitemid, readoption);          


  ActivityInstanceData currentactivity = (ActivityInstanceData)csClient.Read(workitem.Activity.IdRef, readoption);
  TridionActivityDefinitionData activitydefinition = (TridionActivityDefinitionData)csClient.Read(currentactivity.ActivityDefinition.IdRef, readoption);
  ProcessDefinitionData processdefinition = (ProcessDefinitionData)csClient.Read(activitydefinition.ProcessDefinition.IdRef, readoption);
  IList<ActivityDefinitionData> activityDefinitions = new List<ActivityDefinitionData>(processdefinition.ActivityDefinitions);

  string superuseractivitytitle = "";
  string superuseractivityid = "";
  string normaluseractivitytitle = "";
  string normaluseractivityid = "";

  foreach (var activity in activityDefinitions)
  {
    if (activity.Title == "Override")
    {
      superuseractivitytitle = activity.Title;
      superuseractivityid = activity.Id;                    
    }
    if (activity.Title == "Author Decision")
    {
      normaluseractivitytitle = activity.Title;
      normaluseractivityid = activity.Id;
    }
  }


  UserData user = csClient.GetCurrentUser();

  if (user.Id == "tcm:0-141-65552")
  {
    ActivityDefinitionData nextactivity = (ActivityDefinitionData)csClient.Read(superuseractivityid, readoption);
    ActivityFinishData finishdata = new ActivityFinishData();
    finishdata.Message = "Automatic decision activity finished";
    csClient.FinishActivity(currentactivity.Id, finishdata, readoption);
  }
  else
  {
    ActivityDefinitionData nextactivity = (ActivityDefinitionData)csClient.Read(normaluseractivityid, readoption);
    ActivityFinishData finishdata = new ActivityFinishData();
    finishdata.Message = "Automatic decision activity finished";
    csClient.FinishActivity(currentactivity.Id, finishdata, readoption);
  }            

}   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:19:15+00:00Added an answer on June 7, 2026 at 7:19 pm

    Instead of ActivityFinishData use DecisionActivityFinishData

    var decisionActivityFinishData = new DecisionActivityFinishData
    {
      NextActivity = new LinkToActivityDefinitionData{IdRef = "next activity ID"}
    };
    csClient.FinishActivity(currentactivity.Id, decisionActivityFinishData, 
                            readoption);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse a json result from the next google Query: http://www.google.com/ig/calculator?hl=en&q=1USD=?MXN The
I'm trying to decide what database system to use for my next project which
I trying to decide whether we went to Flex, Silverlight or even ExtJS. There
I am trying to decide the pros and cons of the 2 ORM primarily
I'm currently trying to decide the merits of encrypting the web.config for a Web
I'm trying to decide how to choose between the WSO2 Gadget Server and WSO2
I'm trying to decide the best way of having radiobuttons switch around the contents
I'm trying to decide whether I should create a simple StackPanel with Buttons on
I'm trying to decide what validation approach to take for a new ASP.NET MVC
I'm currently trying to decide wether to accept a client's proposal or not. Basically,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.