Skip to main content

Hello,

I've seen that problems regarding state machines are very common however I can't find a resolution to prevent my workflow from erroring when at the stage of changing a state.

The workflow goes through a state machine (with 2 states available) then through a flexi task. If the task is rejected it changes states (this change works fine), then waits for a change in a field before then changing state again to loop back to the first state, however the workflow errors and stops. It appears looking at the times that the workflow errors when trying to start the first state again.

- I have tried resetting the SharePoint Timer Job.

- I have tried running a powershell script suggested on another forum which updates webconfig on all servers in the farm:

$webapp = Get-SPWebApplication -identity eSiteURL]

$webapp.UpdateWorkflowConfigurationSettings()

Any help or advice would be great. - Thanks!

Hi,

Could you try deleting and recreating the Change State action?

From your screenshot il looks like the workflow errored while executing again the Request Approval..could you tell us what is the error (if it's stated in workflow history)?


Thanks for the reply Giacomo,

I have taken a screenshot of the times. It appears the change state finishes (set the next state to Doc Team Review) at 15:13, however then just errors & doesn't start 'Doc Team Review' (i.e. set doc team icon still shows the previous time of 15:11).

I will try to recreate the state machine as you suggest and see if that prevents it erroring.

Thanks again,

Stuart

Workflow shows times


Hi Stuart,

also, could you put a Commit Pending Changes just before the Change State?


Hi Giacomo

I have now recreated the State Machine with the 2 states. I have also added the Commit Pending Changes before both change states however the workflow is still erroring after the Change State to 'Doc Team Review' State. (It Errors before restarting the flexi task).

Any other ideas? Thanks again for your time.

Stuart


can you try with update item action instead of set field value one?

set field value does strange things sometimes.


Thanks for the suggestion Marian.

After further testing it turned out to be an issue with my user account. My company are in the process of migrating to a new domain and this seems to be the cause of the issue. Using an account on the old domain does not cause the state machine to error.

Thanks again,

Stu  


Reply