Sign In

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ SPARK Document Generation

This topic applies to SPARK Workflow Enterprise Edition only.

SPARK Workflow Document Generation activity enables the workflow designer to create custom documents in Word, Excel, PowerPoint or PDF with data dynamically merged from tagged templates stored in SharePoint.

This activity needs SPARK Document Tagger (Office add-in) to be installed on your office applications; the installation process runs aromatically once you open any document template for tagging.

* Important note: You need to have Office 365 Word, Excel and PowerPoint online applications, Office 2013 desktop editions or later versions in order to be able to use this feature as SPARK Document Tagger add-in will not work if  you “the workflow designer” don’t have at least one of these versions up and running at your local machine.

Add-in usage

SPARK Document Generation will enable you to use SPARK Document Tagger to add tags to templates for generating documents. The tags are mapped to variables and workflow data such as columns, Tables and images available in the workflow or SharePoint in general. The add-in loads these data when you open the document template for tagging from SPARK workflow designer. SPARK Document Generation  

For information on this Office add-in, see SPARK Document Tagger.

Document Generation Activity Settings

To use SPARK Document Generation activity, drag and drop the document generation activity from the activities toolbox. Open the activity settings by double click on the activity image or the gear icon

SPARK Document Generation  

* Important note: This activity enables you to generate PDF files from Microsoft Word templates, and store them in the target library. In order to allow the activity to generate PDF files, you need to make sure that SharePoint Word Automation service is configured and started on your farm.

SPARK Document Generation

  • Activity Title: Specify the activity title. You can change the default title/name of the activity using this property.
  • Document template – Document Library: Select the document library that has the document template stored in, the list will show all document libraries for the site that the workflow is being published on. 
  • Document template – Template: Select the document template form the list of templates that are stored in the selected document library (above point). to create a new template you can click on the plus icon + , and fill the new template name and type in the popup dialog.
SPARK Document Generation

  • Document template – Click to open & tag: Click on it to open SPARK​ Document Tagger (Office add-in) to tag and design the template, merging workflow context and data within it.
SPARK Document Generation

  • Output – Document Library: Select the document library to store the generated document in, the list will show all document libraries for the site that the workflow is being published on.
  • Output – Folder Path: Specify the folders path you want to store the generated document in, the folders must be created in the list selected in the above point. This property is optional. You can specify a dynamic path by using the workflow context, variables and functions by clicking on the fx  button.
  • Output – Generation type: (Shows only for Word Templates). Select the file type to be generated, the list has two options (Original file and PDF file), if you select the “Original file” option then the generated document will be the same type of the source template (docx). If you selected “PDF file” then the activity will use SharePoint Document Automation service to convert the generated file into a PDF format file.
  • Output – File Name: Specify the file name of the generated document. You can generate a dynamic name by using the workflow context, variables and functions by clicking on the fx  button.
  • Output – Quality: Select the quality type of the generated file, the list has two options (Standard and Minimum), if you select the “Standard” option then the generated document will have a high quality images resolutions and the document will not be compressed, note that the size of the generated document will be larger than the Minimum option. If you selected the “Minimum” option then the generated document will have a low quality images resolutions and the document will be compressed, however the size of the generated document will be smaller
  • Output – Service Name: Specify your SharePoint farm Word Automation services name, by default the name will be “Word Automation Services”, if you have a custom name for it then you need to specify it in this property, otherwise the service will fail to run.
  • Output – Store output file URL in: You can store the generated document URL in a workflow variable to be used with other activities or services. The list will show all created workflow variables of type string.
  • Output – Show converting process log: By selecting this option, the Word Automation Services running result will be logged in the workflow history, this will allow you to tracing out the converting process and identifying any issue in it.

Create Table Data

This topic describes how to add tables to the Document Generation activity to populate your document templates.

Document Generation Tables contain collection variables to dynamically repeat row, tables, and section data in document templates.

To add a table:-

  1. Open the Document Generation activity settings dialog, fill the required fields, and then click on the Table button in the action ribbon of the activity settings page.

    SPARK Document Tagger
  2. In the Table settings dialog, click Add Table to create a new Table settings fields, note that you can add multiple tables to the same generated document. SPARK Document Tagger
  3. In Table name property, enter the name of your table; note that duplicate names are not allowed.
  4. Set the table style properties: Font size, Font Family and Header Shading Color.
  5. Select the List you want to query and show its data in the table.
  6. Select the columns you want to show in the table, you can add multiple columns by clicking on the Add link.
  7. CAML Query (optional): you can use this property to write a CAML Query to generate complex set of data, filtering, sorting and using the query language techniques to pull needed data from the selected list. You can also use the CAML Query Builder tool to generate your CAML Query visually without the need to write any line of the query code, by clicking on the “Generate CAML Query” link. Note that this property is optional and you can leave it blank in case you want to retrieve all data from the selected list.
  8. Click on the Save button to create the new table settings.
  9. You can always get back to the tables data dialog to edit or delete the table settings. SPARK Document Tagger

Create Image Data

This topic describes how to add images to the Document Generation activity to populate your document templates.

To Add an Image:-

  1. Open the Document Generation activity settings dialog, fill the required fields, and then click on the Image button in the action ribbon of the activity settings page. For information on configuring the activity and adding a template.SPARK Document Tagger
  2. In the Image settings dialog, click Add Image to create a new Image settings fields, note that you can add multiple images to the same generated document. SPARK Document Tagger
  3. In Image name property, enter the name of your image; note that duplicate names are not allowed.
  4. Set the Image URL property, the Image must be located in an accessible web location in order to be retrieved and merged in the generated document. You can specify a dynamic path by using the workflow context, variables and functions by clicking on the fx button.
  5. Click on the Save button.
  6. You can alw​ays get back to the images data dialog to edit or delete the image settings. SPARK Document Tagger
​​​ ​
​​​