During system integration, using files to transmit data is the oldest but most common method. There are many ways to move data files from one folder to another. You can write a system Job , You can also develop Windows ServiceProgramOr create a common application. Biztalk Server We are committed to system integration. Of course, we have our own solutions for this situation. Biztalk Server How to move files.
UseBiztalk ServerTo move files, you do not need to create business processes or user pipelines. You only need to design the receiving and sending ports. In useBiztalk ServerBefore implementing this function, you should first create two folders: the source folder and the target folder. In this instance, we use the source folderC: \ In, Target folderC: \ out. We wantBiztalk ServerTo automatically putC: \ InMove files in the folderC: \ out.
To implement the function of moving files, you need to complete the following tasks:
◇ Define the receiving port
◇ Define the receiving location and Set Properties
◇ Define the sending port and configure
◇ Define a filter to connect the sending and receiving ports
◇ Launch, register, deploy and Test
The specific steps are as follows:
1. OpenBiztalkBrowser
IfBiztalk, InVisual Studio. NET 2003PressCTRL-alt-zThe key combination will openBiztalkBrowser.
2. Create a receiving port
1.InBiztalkIn the browser, expandBiztalkServer host, select the "receive port" node, right-click the node, and select "ADD receive port ".
2.In the displayed dialog box, select "one-way port" and click "Next ".
3.In the displayed dialog box, change the name to"Movefile. PickupClick OK.
3. Create and configure the receiving location
1.Select"Movefile. Pickup \"Receiving location" node, right-click, and select the "add receiving location" menu item in the pop-up menu.
2.In the displayed dialog box, change the nameMovefile. Pickup. Location.
3.Select "transmission type"File.
4.Select "Receive Handler"Biztalkserverapplication.
5.Set "receiving Pipeline"Microsoft. BizTalk. defaultpipelines. passthrureceive.
6.Click "Address"..."Button to bring up the" File Transfer Properties "dialog box, in which you set the receiving folderC: \ In, The file is*. TxtClick OK.
4. Create and configure the sending Port
1.InBiztalkSelect "Send Port" in the browser, right-click and choose "add Send Port" from the shortcut menu.
2.In the pop-up "Create a New sending port" dialog box, select "static one-way port" and click OK.
3.In the port Properties dialog box, change the nameMovefile. Send.
4.In the "Configure\Transmission\Main ", set the transmission typeFile.
5.And click "Address"..."Button to open"FileTransmission Properties dialog box.
6.In theFileIn the Transfer Properties dialog box, set the target folderC: \ out, Set the file name% Sourcefilename %The name of the source file.
7.Click OK to close"FileTransmission Properties dialog box.
8.In the "Configure\Send\Under "General", set the sending pipelineMicrosoft. BizTalk. defaultpipelines. passthrutransmit. This means that only file data is transmitted and no other processing is performed.
9.Set "configuration\Filter and ing\Filter, set the propertyBTS. receiveportname, The operation is=, Value:Movefile. Pickup, Indicating that only the receiving port isMovefile. Pickup.
V. Start and Test
1.Select receiving port\Receiving location\ Movefile. Pickup. Location, Right-click and choose enable menu item.
2.Select the sending Port\ Movefile. Send, Right-click the menu and choose start from the shortcut menu.
3.Place a text fileC: \ InFolder. After one minute, the file will be movedC: \ outFolder.