question

GauravSinghGagwari-3810 avatar image
0 Votes"
GauravSinghGagwari-3810 asked ·

SharePoint 2013: Workflows (2010 Workflow Template) not running properly and Tasks are not getting approved/reject

Dear All,

I have created a workflow in SharePoint 2013 using 2010 workflow template. This workflow is running when any new item is uploaded in the document library.
In the library upload properties form, there are 7 users fields, which are used in workflow to assign task to them.
I have used Start task process to create tasks and assign to the users sequentially upto 7 level. But at level 2, I am generating 2 parallel tasks and then waiting them to complete and then passing no to 3 level and so on.

I have also created 2 new fields in Task list through Tasks(in workflow) only and then setting values it in at stage 'Before a Task is Assign' using Set Task field.

Issue:

Issue1: When end users are uploading the document, sometimes workflow is not working properly and throwing error stating 'an error has occurred' and 1st level task is not getting generated.
Issue2: And sometimes when users are trying to approve/reject tasks then they are not able to do so as they are receiving 'Task is locked by the running workflow and cannot be edited' error.

Workaround:
When I am restarting the workflow after terminating the it is running fine. But the above errors are occurring intermittently. Could you please help in this, as this workflow is running on 26 sites and many users are using it daily.
But this is not feasible as there are 26 sites on which workflow is running.

ULS logs error:
Winwf internal error terminating workflow SharePoint 2010
can't find workflow service proxy or its service application proxy type name is null


Other Info:
Publishing workflows using System account but not using Impersonation step. As Tasks are created with user who is uploading the document.
SharePoint Timer Service is running with Farm account
SharePoint Tracing Service is running with local service account

office-sharepoint-server-administrationoffice-sharepoint-server-development
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

itchsun-msft avatar image
0 Votes"
itchsun-msft answered ·

'Task is locked by the running workflow and cannot be edited'

A cause of this error appearing inconsistently is multiple users responding to tasks in parallel at the same time. In this scenario, one task will complete correctly and the other will not process. When the user tries again, the ‘task locked’ message will display.

In this case, the workflow is locked. In general, it's hard to find a real reason, and if circumstances permit, I suggest you change a complex workflow into several different workflows.

In addition, According to the ULS log you provide. Please check if the Due Date of the task is in the past instead of the future first.

If yes, please modify it to the future and then test.

You can also try to unregister and register the Workflow Proxy. Follow steps to unregister and register the Workflow Proxy:

  1. Go to Central Admin > Manage Service Application > Click on the Workflow Service Application Proxy.

  2. Select it and from the Ribbon click Delete.

  3. Run Register-SPWorkflowService in the PowerShell window. Would recommend using the –Force parameter.

· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@itchsun-msft
Thanks for your response.


The tasks are generated sequentially, like when First approver approves his/her task then only task for 2nd level approver are generated.
At 2nd level only parallel tasks are generated using Start Task Process. And at other levels only single task is generated.


And this issue is also occurring sometimes at level 1 approver, so I dont believe that it has anything to do with parallel tasks? Please share your response.


I am not setting due date for any tasks while creating tasks from SharePoint workflow. So is there any default due date?


I cannot see any Workflow Service Application when I navigate to the path that you have provided above.


I also see the below log in ULS:
Engine RunWorkflow: system.workflow.activities.eventdeliveryfailedexception: event 'OnTaskChanged' on interface type Microsoft.SharePoint.Workflow.ITaskService cannot be delivered. Index was outside the bounds of array


0 Votes 0 ·
itchsun-msft avatar image itchsun-msft GauravSinghGagwari-3810 ·

According to your description, this does not seem to be related to parallel tasks.

Is there any relevant error information in the workflow history other than ULS log?

0 Votes 0 ·

@itchsun-msft
Please refer the below logs:

  • Load Workflow Assembly: System.IO.FileNotFoundException: Could not load file or assembly 'xoml.', Version=, Culture=neutral, PublicKeyToken=' or one of its dependencies. The system cannot find the file specified.

  • Run Workflow: System.ARgumentnullexception: Array cannot be null



0 Votes 0 ·