using Sitecore.Workflows.Simple; namespace MyProject.Workflows { public class CustomWorkflowAction { public void Process(WorkflowPipelineArgs args) { var workflowItem = args.DataItem; // The item in the workflow // Custom logic here } } }Once deployed, you simply create an action (template: /sitecore/templates/System/Workflow/Action) inside a workflow and set the Type string field to the class (fully qualified) followed by a comma and the assembly name (much like you would with pipelines).
The custom action should now run as expected, and you have access to the full item (including it's history - such as who approved the previous workflow step).
No comments:
Post a Comment