There are three different ways to use dox42 within a workflow to generate a document. In this topic, you will learn about those 3 matters so that you can easily deploy the creation of documents via dox42.

But for all methods, there needs to be deposited a template on the dox42 server first, in order to get the look of the document you wish for. It is actually not important to store the template at a specific path, what is important is to remember which path you stored the template, so therefore it is recommended to use the same path for different templates. The template needs to be created in Microsoft Word with the dox42 plug-in, and can, for example, look like that:

dox42 Activity

The more preferable way to use dox42 within a workflow is via the Generate Document activity.

dox42 Linkage over the Webservice Activity

Another way to use dox42 within a workflow is over a web service call. To do so, you will need the REST WebService Activity which does not need much configuration. The configuration of the activity is always quite the same and looks mostly like the screenshot below. 

There are a few query parameters needed, such as the Operation, DocTemplate and the SaveAction.FileName. The other 2 parameters are not required for every REST web service call, but they depend on what should be done with dox42. 

  • Operation: The operation parameter contains the method which should be performed, in this case, a document should be generated.
  • DocTemplate: This contains the path of the template on the dox42 server. 
  • SaveAction.FileName: This parameter specifies the path where the output should be stored. 

After executing the web service call, there is the need of using another activity to store the generated file in and not just its path. 

dox42 Linkage over the PowerShell Script Activity

The more complicated way to use dox42 but yet a way where each step can be viewed and therefore is probably more understanding than the web service call, is via the PowerShell Script Activity. For those who are not especially interested in how dox42 works, it is more or less just copying the code to your activity and replacing a few variables or use the web service call version. 

First of, a few assignments are made, where the server and the server port, the name of the output file, etc. is specified. After that, the web service is configured which basically contains the same assignments as the parameters in the web service call activity. Then the web service is called and processed, with all previously configured parameters. And after that the path of the generated file is returned and stored in a variable. 

After executing the powershell script, there is the need of using another activity to store the generated file in and not just its path.

Previous |