Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

How to create task in Sequential Workflow?

$
0
0

Hi,

I created Sequential Workflow for SP2013 Custom List. Cod is below.


public sealed partial class SequentialWF : SequentialWorkflowActivity
    {
        public SequentialWF()
        {
            InitializeComponent();
        }

        public Guid workflowId = default(System.Guid);
        public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();
        public Guid createTask1_TaskId1 = default(System.Guid);
        public SPWorkflowTaskProperties createTask1_TaskProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();

        private void createTask1_MethodInvoking(object sender, EventArgs e)
        {
            createTask1_TaskId1 = Guid.NewGuid();

            createTask1_TaskProperties1.Title = "Task";

            createTask1_TaskProperties1.Description = "Please appraise the form";

            createTask1_TaskProperties1.StartDate = DateTime.Now;

            createTask1_TaskProperties1.AssignedTo = "...@....com";
        }
    }

When I created list item then error occurred in the workflow.

What might be the reasons for the error?



Viewing all articles
Browse latest Browse all 25064

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>