Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to initiate a workflow on a regular basis on specified time. This workflow has to execute a custom activity (business logic in C# code to create the components in Tridion) during its execution. Is it possible to achieve this in Tridion workflow? If not suggest the best way to achieve this?

share|improve this question

Starting a workflow should be done by some form of external trigger (typically a user creating or editing an item).

To do this in an automated way you would need to write a script/program which can be scheduled to trigger the process. I would consider writing either a windows service (probably overkill) or a power-shell type script (which can be scheduled to run when desired).

Your code should use the Core Service to start the workflow process for the given item. The following snippet may get you started:

StartWorkflowInstructionData startWorkflowInstruction = new StartWorkflowInstructionData();
startWorkflowInstruction.Assignee = new LinkToTrusteeData { IdRef = client.GetCurrentUser().Id };
startWorkflowInstruction.ActivityTitle = message;
startWorkflowInstruction.ProcessInstanceTitle = "ECL ITEM:" + actionType.ToString();
startWorkflowInstruction.Subjects = new[] { new LinkToIdentifiableObjectData { IdRef = bundle.Id } };
        client.StartWorkflow("tcm:0-" + pubID + "-1", startWorkflowInstruction, new ReadOptions());
    return usingItems.Count() + " items that are using " + itemID + " have been added to a bundle and are now in workflow";
catch(Exception e)
    return e.Message;

This sample adds items to a bundle and starts the workflow (the concept is similar if you are not using bundles). Be careful to check if the item you want to put into workflow is not already in workflow or it will fail.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.