4

I have a custom site workflow with some logic that copies items to a custom list with Title and Email. On this list I have a SPD workflow with one OOTB activity - send email to Email when an item is created.

My custom code adds up to 30 items to this list at once every 24hr but my issue is that the email workflow only runs on the first six items. I.E today 15 items was added to the list but only six persons got an email. I check the status of the workflow and it's all fine but for the items it didn't run on it simply says "there are no running workflows on this item" or "there are no completed workflows on this item" and no failed workflows.

Is there a limit on how many workflows you can run when you add many items at once? I wouldn't believe so but..

Thanks in advance.

Edit: this is SharePoint in Office365 so I don't have access to log files. Edit2: I tried this on a on premises server as well and only workflow only kicks off on the first six added items, why is that?

2 Answers 2

1

My Personal Experience i had a same problem add multiple items.at that time i create workflow association starts Designer Workflow when ever new item is created.

//obtain an instance of SPWorkflowManager which will be used to start the workflow
SPWorkflowManager manager = site.WorkflowManager;

//get all workflows associated with the list 
SPWorkflowAssociationCollection associationCol = list.WorkflowAssociations;

foreach (SPWorkflowAssociation association in associationCol)
 {

    if (association.Name == "Email Notification")
    {
        //get workflow association data
        string assData = association.AssociationData;
    }
}
0

Try to look at Correlation token property in all workflow elements. This property in OnWorkflowActivated and CreateTask should be different: for OnWorkflowActivated it should be equal to WorkflowToken and for CreateTask - TaskToken.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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