Click here to Skip to main content
Click here to Skip to main content
Go to top

How to invoke a BizTalk Orchestration using Office InfoPath 2003

, 17 Mar 2006
Rate this:
Please Sign up or sign in to vote.
This article describes how to connect InfoPath 2003 with BizTalk Server 2004 Orchestrations.

Introduction

There are several situations in a workflow where human interaction is required; here is when InfoPath 2003 comes into picture. Essentially, InfoPath 2003 is used to create/edit XML documents based on a schema or a template. This template in InfoPath has a [*.xsn] extension. Using InfoPath a template (*.xsn) is created and several instances of XML documents are created based on that template. InfoPath 2003 is available as a part of Office 2003 Enterprise Edition.

Scenario: Loan processing application

In short, we shall be creating a loan processing application in BizTalk and will access this application using InfoPath 2003.

Quick <TODO> list

  1. Open Visual Studio .NET 2004 and create a new empty BizTalk project.
  2. Create the Loan Request (input schema) and Loan Response (output schema) schemas.
  3. Create a map (*.btm) to map the input schema to the output schemas.
  4. Create the Loan Processing Orchestration (*.odx) and specify the ports, key file and deploy.
  5. Convert the Loan Processing Orchestration to be accessible as a web service. An orchestration can be activated through a web service call.
  6. Open InfoPath 2003 and create a new template from the web service. Specify the input and output and finally call the orchestration from the InfoPath form.

Creating the BizTalk project

Create a new BizTalk Server Project in Visual Studio .NET.

Step 1: In the Visual Studio .NET menu, select the File -> New -> Project and type the name "LoanProcessingApplication".

Building the schemas - LoanRequest.xsd and LoanResponse.xsd

Step 2: Right-click on the project in the Solution Explorer and select the "Add New Item" option. Then, select the item "Schema" and name it "LoanRequest". Add the schema elements and promote the properties as shown in the picture below:

Step 3: Perform 'Step 2' again and name the schema as "LoanResponse". Add the schema elements and promote the properties as shown in the picture below:

Creating the map

This map transforms data from the 'LoanRequest' to the 'LoanResponse' message.

Step 4: Right-click on the project in the Solution Explorer and select the "Add New Item" option. Then, select the item "Map" and name it "LoanRequest-To-LoanResponse-Map". Select the LoanRequest and LoanResponse schemas as the source and destination schemas respectively and map the schemas as shown in the screen shot below:

Building the loan application processing orchestration

This orchestration contains the actual loan application processing logic.

Step 5: Right-click on the project in the Solution Explorer and select the "Add New Item" option. Then, select the item "BizTalk Orchestration" and name it "LoanAppOrchestration". Place the various shapes used in the orchestration as shown in the picture below. Note: Download the code provided above and observe the orchestration file:

Step 6: Creating the port.

  1. Right-click on the port surface in the orchestration and select "New Configured Port..."
  2. Click Next and specify the port name as "WSLoanPort" and then click "Next". Specify the properties as shown in the screen shot below:

  3. Specify the Port Bindings as shown in the screen shot below:

Step 7: Strong name and deployment

  1. Create a key file using "sn -k LoanKey.snk" in the Visual Studio .NET command prompt.
  2. In the Solution Explorer, right-click on the "LoanProcessingApplication" project properties and select "Assembly" and specify the key file name.
  3. In the Solution Explorer, right-click on the "LoanProcessingApplication" project properties and select "Deploy". In the BizTalk Explorer, right-click on the listed orchestration under the "Orchestration" folder and select "Start". The orchestration icon must turn to blue.

Creating a web service out of a BizTalk orchestration

Step 8: Using the BizTalk Web Services Publishing Wizard.

  1. In the Visual Studio, select Tools -> BizTalk Web Services Publishing Wizard. In the wizard, select "Publish BizTalk Orchestrations as Web Services" and click "Next". Follow the wizard screen shots below:

Step 9: Testing the web service: Test the web service which is generated by the wizard using the URL as shown in the image below:

Using InfoPath 2003

Step 10: Open InfoPath 2003, and select "Design a Form".

  1. Select the options in the wizard by looking at the screen shots below:

Drag and drop the data source fields on to the InfoPath form and form the layout. See the "Preview" of the InfoPath Form screen shot below:

Step 11: Test the solution.

  1. Save and Open the XSN file, enter the input values for the loan application and click "Run Query". Note the result values appearing on the InfoPath 2003 form.

Quick takeaways

  1. Always set the Activate property to "true" for the first Receive shape in the orchestration.
  2. The access restrictions must be set to "Public" when you want to access the orchestration as a web service, in the Port Configuration Wizard "Select a Port Type" screen.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Naveen Karamchetti
Architect AT&T Wi-Fi Services
United States United States
Naveen has done his Masters (M.S.) in Computer science, has started his career programming the mainframes and now has more than a decade of programming, development and design experience. Naveen has a sharp eye and keen observation skills. Naveen has worked for several companies and strived hard to build large scale business applications and bringing better solutions to the table.
Quite recently Naveen has built a fairly complex integration platform for a large bank. His hobbies include training, mentoring and research. Naveen spends his free time visiting National Parks nationwide.
 
Naveen has developed the BizTalk Control Center (BCC)
http://biztalkcontrolcenter.codeplex.com

Comments and Discussions

 
QuestionHow to debug biztalk application Pinmemberrayan nisar22-Dec-11 19:33 
GeneralExposing an orchestration as a web service in Biztalk Server 2006 R2 PinmemberNaveen Karamchetti24-Mar-09 10:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 17 Mar 2006
Article Copyright 2006 by Naveen Karamchetti
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid