For the use of dynamic port output files, Fred proposes how to avoid overwriting files and how to use an XML data item as part of a file name. This article briefly describes how to implement.
One, create an empty BizTalk Server Project Dynamicoutfile, set the assembly key file. For information on setting the assembly key file, refer to article 1.
Second, create a simple schema file, simpleschema.xsd, to set the type of message. Upgrade the UserID node as shown in the figure.
Third, use the schema file to generate a Test.xml file for testing. For the creation of schemas, refer to document 2; For schema file generation instance files, refer to document 3;
Create a business process, add an orchestration, and add inmsg and OUTMSG messages to the process, all of which are of type Outfilename.simpleschema.
V. Add a Receive Message action Receivemsg, a message assignment assignoutmsg, and a send message action sendmsg for the orchestration. Constructs a message together with the message assignment, sets the name to Constructoutmsg, and sets the constructed message to outmsg.
Vi. Add a InPort port for the orchestration, and receive the *. * file from the C:/in folder using the Microsoft.BizTalk.DefaultPipelines.XMLReceive pipeline.
Add a outport port for the orchestration, and use the Microsoft.BizTalk.DefaultPipelines.XMLTransmit pipeline to dynamically output the file.
Eight, the expression of setting assignoutmsg is:
outmsg=inmsg;
Outmsg (FILE. Copymode) = 0;
OutPort (Microsoft.XLANGs.BaseTypes.Address) =@ "file://c:/out/" +
System.DateTime.Now.ToString ("yyyyMMdd") + "_" +
Inmsg (Dynamicoutfile.userid) + ". xml";
Nine, connect the InPort port with the receivemsg, connect the outport port with the sendmsg, and set the receivemsg activation to ture.
Compile and program the project, put the Test.xml into the C:/in folder below, and test.
--------------------------------------------------------------------------------
Reference documents:
Document 1 Biztalk Troubleshooting required Strong Name Assembly Http://blog.csdn.net/fengfangfang/archive/2006/07/11/904725.aspx
Document 2 How to quickly create a schema for Biztalk development http://blog.csdn.net/fengfangfang/archive/2006/07/04/874252.aspx
Document 3 Validation of schemas and examples http://blog.csdn.net/fengfangfang/archive/2006/07/04/874477.aspx
Document 4 using the dynamic port output file http://blog.csdn.net/fengfangfang/archive/2006/08/02/1010087.aspx