0

In SharePoint 2013 Foundation edition using SharePoint 2010 workflow engine, I've got a workflow which handles the companies onboarding/leavers/movers process and it submits tasks to various people around the company. I'm having an issue with it where it tries to increase the percentage complete of the master task but fails due to incorrect data type being updated. I understand this problem, but I can't see why it's a problem and how I could resolve it.

So for context, a 'percentage increase per subtask completion' is calculated. For this particular task, this value is calculated at 0.125 (shown as a percentage). Once the subtask is complete, it updates it from 0 to 0.125 successfully. However on the second subtask, it fails. The new value is 0.25.

Workflow Designer view

I've also just tried it with a different value of 0.1429 per subtask completion and it's still failing.

Data types are listed below:

  • Variable 'NewPercentage' - Number
  • Column '% Complete' - Number
  • Column 'Percentage Increase Per Subtask Completion' - Number

The workflow designer are returning all these values as the data type 'Double'.

I'm really struggling to find a resolution to this problem so any help is appreciated.

Thanks!

0

Turns out the error had nothing to do with data types. The error was occurring because the workflow was locked for edit.

"This task is currently locked by a running workflow and cannot be edited" is a common message which is seen when an error occurs while the SharePoint workflow engine is processing a task item associated with a workflow.

When a workflow processes a task normally, the following sequence of events is expected to occur:

The process begins. The workflow places a ‘lock’ on the task so nothing else can change the values while the workflow is processing. The workflow processes the task. The lock is released when the task processing is finished. When the message is encountered, it usually indicates that an error occurred between step 2 and 4. As a result, the lock is never released.

Therefore, the ‘task locked’ message is not an error itself, rather a symptom of another error - the ‘task locked’ message does not indicate what went wrong. In most cases, once this message is encountered, the workflow cannot be made to continue and must be terminated and started again." - Taken from: https://community.nintex.com/t5/Nintex-for-SharePoint/Task-Lock-Task-is-locked-by-a-running-workflow-and-cannot-be/td-p/85000

I've recreated the master task creation code and can see that it was another issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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