Applies To: Information Worker for SharePoint 2013/2016 and Cloud
Workflows can be very useful to build business process around PDF forms. This might involve certain level of automation like running workflows automatically when PDF form (item) is created or updated.
During submit PDF form requires multiple update events to accomplish submit process. In such cases SharePoint workflows might be triggered multiple times during single form submission. Following instructions describes how to avoid triggering multiple workflow instances: add additional text field which will store current information about form update. When form is submitted, it will automatically look into this field to decide if workflow can continue the process or should be stopped. Once workflow is triggered, it will change text field value to prevent starting of workflows again during next update iterations.
Step 1. Additional field
1.1. Add hidden text field to your PDF form. This text field will work as flag to prevent execution of additional workflows. In this example field name is "wfStatus";
1.2. Add mapping to the "wfStatus" field to allow workflow easily read value inside it. In this case mapped column is also called "wfStatus";
1.3. Add following action for "Submit" client rule located in Rules section of Options tab:
As the result, each time when form is submitted - field will be updated with value "pending".
Step 2. Workflow
Following workflow is used as an example:
First this workflow will read current value of "wfStatus" column for submitted PDF form. If value is equals to "pending" - means that workflow can proceed with sending an email. Before sending an email workflow should change value inside "wfStatus" to prevent additional executions:
In this example value of "wfStatus" is changed to "updated".