Question

I have a list and this list has several columns and rows that all stay the same for the most part except for the Assigned To column. Basically every time that the column is changed it should send an email to the user it was changed to and myself.

I have a workflow that has settings set up so it executes:

Start Workflow automatically when an item is created (selected)
Start Workflow automatically when an item is changed (selected)

My workflow code is:

Stage: Stage 1
    Email Current Item:Assigned To
Transition to stage
    Go to End of Workflow

The first time I edit the list item and I assign it to someone it emails as expected and works perfect. However if I remove that person, and save then put them back on it they do not get an email. They also do not get an email if I switch the person. It seems to only run on the first change and then never again. I would like it to run every time there is a change.

As requested below are two pictures one is of my workflow settings and the other is of the code.

workflow settings enter image description here

Était-ce utile?

La solution

The issue was not the connection of the workflow to the list. The issue was the items within the workflow failing to find items in the list. When the workflow was executed the second time one of the items it was trying to pull did not have anything in it so it would give a NullPointerException. It then suspended the workflow so it did not try to run it again and encounter the same error.

I resolved the issue by removing the workflow, and rebuilding it from scratch double checking all the connections. Once I ensured the connections would always have data in them, the workflow worked as expected.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top