The Process Engine can attempt to match the title, like FirstName, of Word Content Controls with data item names like Solution.DataItems.FirstName. If you have a solution and process data item with the same name, then the process data item value will be used.
To allow the Process Engine to automatically populate Word fields with data item values, complete the following steps:
- Check out and open the process you want to edit.
- In the Toolbox pane, click Microsoft Office. A list of activities is displayed.
- Double-click or drag the Write Word Document activity into the process.
- Link the activity appropriately with other activities in the process.
- Right-click the Write Word Document activity. A shortcut menu is displayed.
- Select View Properties. The Write Word Document window is displayed.
- Click the Input File or Template Location tab. The corresponding screen is displayed.
- In the Input File Location field, select the appropriate input field editor and set the field to a value that is a location where the Word document is stored.
Note: |
If your system resource contains a data item in the connection string property, click Configuration values and enter a valid connection string for design-time, configuration purposes. |
- In the Authentication section, select Run as BPM Server or Specify credentials.
Note: |
If you select Run as BPM Server, access will be granted or rejected based on the BPM Server credentials. If you select Specify credentials, complete the Username, Password, and Include domain fields using the appropriate input field editors. The Include domain check box is optional. |
- Click the Data Mappings tab. The corresponding screen is displayed.
- Select the Automatically Map Data Items to Document Fields check box.
- Click the Output Destination tab. The corresponding screen is displayed.
- In the Output File Name field, select the appropriate input field editor and enter the name you want the file to have.
Note: |
You do not have to specify a file extension. The file extension from the input file will be used. |
- From the If the file already exists section, select Overwrite the file or Increment the file name.
Note: |
Select Overwrite the file to replace the existing file. Select Increment the file name to append a _1, for example, to the file name the first time the process runs and sees that a file already exists. The number will increment each time the process runs and finds a file with the same name. |
- In the Output File Location field, select the appropriate input field editor and set the field to a value that is a file location where you want to store the Word file.
- In the Authentication section, select Run as BPM Server or Specify credentials.
Note: |
If you select Run as BPM Server, access will be granted or rejected based on the BPM Server credentials. If you select Specify credentials, complete the Username, Password, and Include domain fields using the appropriate input field editors. The Include domain check box is optional. |
- Click OK. You configured the activity to allow the Process Engine to automatically populate word fields with data item values.