Kathy Lori
Kathy Lori

Reputation: 497

Using a composite template

I'm trying to figure out when I need to set a sequence order# for a server template and whether I need to do the same for a composite template. Here is the problem I'm trying to address: my envelopes will have 3 or 4 documents, each document will have its own template. I will have inline templates for each document, it will be the same signer roles on each document. If I have multiple document/template pairs in an envelope, does that mean I have to use a composite template? If I am using multiple server templates for a doc, for example, is that when the sequence order is important? I just need to understand these composite templates more.

Upvotes: 0

Views: 186

Answers (2)

WTP
WTP

Reputation: 700

You must use composite templates. The sequence of the documents in the envelope will follow the structural sequence of your compositeTemplate elements.

Each compositeTemplate element has one or more serverTemplates and/or inlineTemplates. Each template element of those arrays has a sequence element with an integer value. These values should form a sequence within that composite, and determines the order in which a document is derived for the composite and the order of overwriting that takes place for other envelope elements.

The document contributed to the envelope by a single composite is either explicitly provided via the composite::document node, or if not present, by the first (lowest sequence value) template within the composite that can contribute a document, such as a serverTemplate document or an inlineTemplate::documents node.

Overwriting envelope elements follows the "last in gets final overwrite" approach. Thus the value specified in the last (highest) sequence template overrides all previously set values.

Upvotes: 1

Larry K
Larry K

Reputation: 49104

If I have multiple document/template pairs in an envelope, does that mean I have to use a composite template?

Yes.

If I am using multiple server templates for a doc, for example, is that when the sequence order is important?

Sorry I'm not an expert on this yet. There are several StackOverflow questions about Compositing Templates, check them out.

Also, what's best is to try out a test envelope. If it doesn't work the way you expect, then ask a new, specific, question about your code.

Upvotes: 1

Related Questions