primedocsConnectBridge
Overview
If a OneOffixx Connect solution is already in use and web-enabled primedocs templates should now also be able to be used with Connect, the primedocsConnectBridge
can be used.
The primedocsConnectBridge
is only used if you want to use both “classic” and web-enabled templates.
If you only want to use web-enabled templates, you can use primedocs Connect directly.
Data can be transferred to Forms or Data via the primedocsConnectBridge
. “Classic” templates ignore the data in this element and continue to receive their data via the OneOffixx Connect functions (“DocumentParameter”, ‘Recipient’, “CustomInterfaceConnector”, etc).
Result of a document generation
When using OneOffixx templates, template files are created in .dotx format by default. In contrast, the generation of web-enabled primedocs templates always creates a complete document in .docx format.
When calling up such web-enabled templates, the SaveAs command should therefore always be used and then the DefaultProcess executed. This ensures that the document is saved correctly in .docx format and then opened correctly in Word.
Structure
The primedocsConnectBridge
element is a child element of OneOffixxConnect
:
<OneOffixxConnectBatch>
<Entries>
<OneOffixxConnect>
...
<primedocsConnectBridge>
<Data />
<Forms />
</primedocsConnectBridge>
<Commands>
<Command Name="SaveAs">
<Parameters>
<Add key="Filename">\\MyServer\share\organization\...\documentxyz.docx</Add>
</Parameters>
</Command>
<Command Name="DefaultProcess" />
</Commands>
</OneOffixxConnect>
</Entries>
</OneOffixxConnectBatch>
Data and Forms are available within the primedocsConnectBridge
. The structure within these elements is identical to the structure in primedocs Connect
“Classic” templates vs. web-enabled templates
The primedocsConnectBridge
only acts as a bridge for web-enabled templates. If necessary, all data that was previously specified in the document parameter, for example, must also be specified in Forms
.
As there is no Recipient
function in web-enabled templates, a “data container” must be configured in Forms
or Data
.
Example
<OneOffixxConnectBatch>
<Entries>
<OneOffixxConnect>
<Arguments>
<!-- primedocs Template -->
<TemplateId>30b55516-80b5-41d7-801b-b31d6da376ac</TemplateId>
</Arguments>
<!-- DocParam etc. can also be specified for classic templates... -->
<!-- This part will only be used with modern primedocs templates -->
<primedocsConnectBridge>
<Forms>
<Value Key="Subject">Test Subject</Value>
</Forms>
<Data>
<Object Key="TestObjectA">
<Value Key="InObjectATestA">Value A in Object A</Value>
<Value Key="InObjectATestB">Value B in Object B</Value>
</Object>
</Data>
</primedocsConnectBridge>
<!-- OneOffixxConnect Commands etc. can be used as well -->
<Commands>
<Command Name="ConvertToDocument" />
<Command Name="SaveAs">
<Parameters>
<Add key="Filename">c:\temp\sample.docx</Add>
<Add key="Overwrite">true</Add>
<Add key="CreateFolder">true</Add>
<Add key="CopyOnly">false</Add>
<Add key="AllowUpdateDocumentPart">false</Add>
</Parameters>
</Command>
</Commands>
</OneOffixxConnect>
</Entries>
</OneOffixxConnectBatch>
PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland