SOLVED

App Step to copy document to second library with Workflow in SPD2013

Regular Contributor

Experiencing something odd here. I have a doc library that uses a SPD workflow to copy the current item to another library. To do this I'm using an App Step to elevate permissions in the workflow as the destination library is not accessible to the user.

 

This other library has an Approval workflow that starts when a document is created. Problem is, it doesn't fire for a document copied using the App Step. Drop a doc into the second library directly and the workflow fires as expected.

 

 

1 Reply
best response confirmed by Ian Moran (Regular Contributor)
Solution

This is normal behaviour. A workflow will not automatically trigger on an item that is created by a workflow. This protection mechanism is called 'workflow recursion prevention'. Example: A workflow is triggered when a new document is added. That workflow created a second document in the same library. This would result in an endless loop.

 

You can solve this issue by using rest calls to start the workflow on the new created item. You can find more information at the following link.