Manually creating a LargeDoc

I manually create the bizdoc and assign it a doctype, add the contents via addContentPart and submit it to tn using wm.tn:submit.
My problem is that because I manually submit the document TN does not treat it as a largeDoc. I have to manually update the inputs to addContentPart when it is a largeDoc, therefore I first have do determine if it is a largeDoc based on file size vs. tnBigDocThreshold value.
I guess I can use the getSystemProperty to find the value of tnBigDocThreshold but not sure if getSystemProperty will pick up TN configurations but how do I get the filesize.
What do the inputs for addContentPart look like, specifically those that let you identify the document as a largeDoc like storageType and storageType.

Has anyone attempted this before?

TIA!

Chris,

Does routeXML work? Otherwise, you may have to use tn.receive. The initial content handler that picks off incoming documents usually determines if the document is large based on the variable in tn config file (th big doc threshhold). It looks at the size of the byte array in the post and compares. It is important for the system to make this determination because it then triggers the write to the file system in the folder you specify (or default if not specified) in the tn config prop file.

I don’t know if your approach will work. But, there are two fields that are updated in the biz doc:

In BizDoc Envelope: LargeDocument? (BOOLEAN)
and in the sub-array document ContentParts (BizDocContentPart) ContentParts[0]/LargePart? (BOOLEAN)

I suppose you could add addendums to each transaction that may/maynot be large so the internal BOOLEAN will be set for each. I just don’t know what internal function is called to trigger the actual write of the large document to the file system and where the specific pointer to the file system file for the data is set in the transaction meta-data.

Just a few random thoughts (oh yeah, the dolphins took a beating last night.)

Ray

Chris,

One other mysterious option: You can use the Java API in IntegrationServer for TN (webMethods6\IntegrationServer\packages\WmTN\doc\API\index.html).

Look up Routing Actions and Routing Constants. Under Routing constants, there are a number of “Persist” constants.

You’ll note that most of them are “internal” only. Good luck Mr. Bond.

Ray

Ray,

I was hoping I didn’t have to get that complicated.
I have the following:
wm.tn.doc:createNewEnvelope
wm.tn.doc:addContentPart
wm.tn:submit
The inputs to wm.tn.doc:addContentPart allow me to specify if it’s largeDoc. I just don’t know what they look like.
Would getTransportInfo get me the file size when the file is FTP’d to my service?

The reason I’m doing it this way is that I like to identify what type of Application Flat File I’m inserting into TN by previewing the contents. ie. CompanyA 810 Flat File rather than just Application Flat File.

Thanks for the tips.

Hey Chris,

When I worked for exchanges (Commerce One Based) we used to wrap our flatfiles in an xml transport document and base64 encode the payload. That way, we could determine the CompanyA, Company B, Document Type 1, 2, etc. Since you seem to have some control over this, I would consider doing it this way if it is feasible.

 
<transportdoc> 
    <header> 
       .... Header Junk .... 
          <doctype> 
          .... etc 
    </header> 
    <payload> 
        .... base64 encode to get out bad chars .... 
    </payload> 
</transportdoc>