Once the user has opened up a Word document, tags must be added in order for information from a process or object to appear in the document being generated. The syntax used to include the tags can be found at https://docxtemplater.com/. This section will explain how to use the syntax with the appropriate tags.

Where Does the Information Come From?

When an user generates a document the tags in the Word document are replaced with information coming from the EPC.

For example, if the user wishes to include the version of the process, the tag {version} must be inserted into the Word document. When the SOP is generated, the EPC will find the {version} tag and replace it with the appropriate version number.

Data Structure

The data is structured in a specific manner. The proper syntax and logic must be used to ensure the right output. See below for the general data structure.

Object Level Parent Type Description
templaterConfig 1 N/A Object This top level object will contain information on the subject on which the document is being generated on and the template being used to generate the document
objects 1 N/A Array The data for objects such as rules, risks, controls, documents, etc, will be in this top level array when the user generates an document. The array can contain multiple objects
subject 2 templaterConfig Object The subject object contains the various properties relating to the EPC object you are generating a document on (name, version history, attributes, impacts, etc.)
templateDocument 2 templaterConfig Object The templateDocument object contains information about the template being used to generate the document
object 3 subject, objects array Object Base information like name, current version and associations of the EPC object
versions 3 subject, objects array Array Version history of the EPC object
approvalEntries 3 subject, objects array Array Approval entries/history of the EPC object
properties 3 subject, objects array Array User defined attributes of the EPC object
impact 3 subject, objects array Object Impacts of the EPC object
nodes 3 subject, objects array Array Flow Object information in the process (only for documents being generated on processes)
improvementRequests 3 subject, objects array Array Improvement Requests on the EPC object

The last 7 elements (object, versions, approvalEntries, properties, impact, nodes, improvementRequests) constitute an EPC object. For example, if a document is being generated on a process:

  • object: base information on the process and its associations
  • versions: the version history of the process
  • properties: the UDAs their values related to the process
  • impact: impacts of the process
  • nodes: flow object base information and associations within the process
  • improvementRequests: improvement requests raised on the process

In this case, we could use “object” to output the name and description of the process. “version” could be used to print the version history of the process. “nodes” would print the name and description of the flow objects within the process. Those 6 elements constitute a “block” of properties that define an EPC object. This block can be repeated multiple times if a document is being generated to include sub-items (such as all documents within a folder)

Which EPC objects is included where will be based on the context of the document generation. The table below explains which object(s) will be included under templaterConfig/subject and objects

Document Generation On templaterConfig/subject objects
Process Contains: only the main process Contains: main process + all sub processes
Set (any) Contains: only the set Contains: all objects under the Set excluding folders
Folder (any) Contains: only the folder Contains: all documents under the folder
Objective Contains: only the objective Contains: The objective + child objectives, KPIs, KRIs, KCIs under the objective
KPI, KRI, KCI Contains: only the indicator Contains: The indicator + child indicators
Org Unit Contains: only the org unit Contains: the org unit + child org objects
Any EPC Object with no sub-items* Contains: only the EPC object Contains: only the EPC Object

*EPC objects without sub-items include documents, roles, assets, resources, risks, controls, rules, entities and attributes.

Displaying Information

To display information, the name of the object from which we want the information from must be specified. Referring to to the block of code above, if we want the name of the role associated to a process, we have to specify from which object it is coming from. However, that object can also belong to another object at a higher level, which also must be specified. In the example below, we specify from the top level object down to the object property we want printed.

{#objects}{#object}{name}{/object}{/objects}

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
Visit the Support Portal

Post Comment