Integrating InfoPath 2003 with BizTalk Server 2002
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Peter Kelly, 3Sharp Consulting
Applies to: Microsoft Office InfoPath 2003, Microsoft BizTalk Server 2002
Summary: Read how organizations can use Microsoft Office InfoPath 2003 and Microsoft BizTalk Server together to create business process solutions. Using InfoPath and BizTalk Server, organizations can increase productivity and efficiency, empower information workers, and simplify the solution development process. (8 printed pages)
XMLeXtensible Markup Language is a metadata definition language used to describe data in a structured open format.
XML SchemaValid XML files used to define the structure for other XML Files.
Business Processa set of tasks, with an associated workflow which, taken together, are geared toward generating some business result. Business processes can be loose or rigid, with required process steps, approvers, etc.
A key premise of this article is that organizations can greatly benefit from having XML on the desktop. Since XML makes it possible to reuse data across platforms and applications, integrate disparate systems, and streamline business processes, organizations would do well to explore the role that XML-enabled desktop productivity applications can play.
The entire Microsoft Office System was built around XML as an enduring theme. Microsoft Office Word 2003, Microsoft Office Access 2003, and Microsoft Office Excel 2003 all have extensive XML support. Word and Excel, in fact, use XML as a native file format. A new product is Microsoft Office InfoPath 2003, which Microsoft built on XML. InfoPath brings XML functionality to the desktop by allowing information workers to gather and manage business data in XML without requiring them to know XML.
InfoPath is the ideal forms client for XML-based business processes. As organizations seek to build solutions that are flexible and responsive to changing business needs, they find that Microsoft BizTalk Server 2002, also based on XML, provides a perfect complement to InfoPath. In this article, we explore the specific ways in which InfoPath can work with BizTalk Server in XML-based business process solutions to increase productivity and efficiency, empower information workers, and simplify the solution development process.
XML and Business Processes
By business process, we mean any set of tasks that are geared toward generating some business result and that involve organized participation (workflow). For example, the activities of submitting an expense report and having it approved can be inefficient or efficient, depending on how well the organization transformed the activities into a business process.
When dealing with data, as most business activities today do, technology is a major factor in creating a business process. At the same time, however, limitations in technology created obstacles to building efficient and cost effective business processes. The key challenge is that most organizations have a number of dedicated systems, each with its own proprietary data format. While each system can function quite acceptably on its own, it is difficult to integrate data and activities within, for example, an ERP system and an inventory system from another vendor. Certainly, business processes involving multiple systems are possible to build, but they are less flexible and less efficient than if both systems understand the same data natively.
XML alleviates this problem as it makes it possible for disparate systems to understand and act upon common data. Through a common schema, disparate systems can exchange information and thread business processes through each other more seamlessly. As a result, XML can help organizations achieve unprecedented workflow efficiencies. As the rest of this article show, Microsoft invested in building native XML capabilities into products such as InfoPath and BizTalk Server, to help organizations actualize the vision of the agile enterprise.
InfoPath and BizTalk for Streamlined Business Processes
InfoPath allows information workers to gather and manage business data in XML. As a desktop product, InfoPath provides the "last mile" for business processes, which, of necessity, involve people. InfoPath allows form designers to create a rich front-end interface to any XML-based business process, hiding the complexities of the various back-end activities that need to take place such as retrieving data from a SQL database.
While InfoPath provides the integral desktop piece of the business process solutions puzzle, BizTalk Server acts as the central orchestration point to tie together various legacy systems, back-end systems, and even data from business partners, vendors, and customers. Together with BizTalk, InfoPath offers the following benefits to those wanting to create business process solutions:
More powerful business process solutions that connect people, processes, and information InfoPath offers built-in integration with business systems and processes using Web services, allowing more people in an organization better visibility into business information so they can gain deeper insights, make better decisions, and take more effective action. BizTalk Server provides the foundation for advanced workflow orchestration that allows an InfoPath-based business process solution to map to the activities required for that business process.
Use existing resources InfoPath has the ability to connect directly to sources of data such as Web services and databases. This makes it easier to build solutions that provide information workers with up-to-date access to information at the source.
Familiar interface and seamless business process InfoPath provides a rich, familiar Microsoft Office document authoring experience that enables end users to dynamically accommodate their own real-time information gathering needs within structured forms, helping individuals improve their ability to participate in an increasingly demanding business environment. With BizTalk Server working in the background, information workers do not need to know the entire business process or even the next step. They can focus on their jobs and let BizTalk handle the workflow.
Flexibility to adapt business processes to address business needs Using InfoPath as business process client and BizTalk as business process server frees solution developers from the rigidity of current business process solutions. Because InfoPath/BizTalk-based solutions are based on XML and are not dependent upon communication between proprietary interfaces, they can adapt to address changing business needs.
Easier solution development InfoPath delivers a robust development environment for rapidly and easily creating and adapting forms for gathering information, improving an organization's ability to anticipate, manage and respond to changes in the marketplace in order to maximize opportunities. Completing the workflow story, BizTalk Server provides orchestration capabilities to intelligently route forms and to process and submit data.
The rest of this article explores how InfoPath and BizTalk Server work together and describes three key scenarios for creating business process solutions. Note that this article focuses on the integration of InfoPath with BizTalk Server 2002.
InfoPath is the ideal application for customers who want to provide a rich interface for interacting with forms as a part of their workflow processes. InfoPath native support for generic XML documents makes it easy for companies to integrate InfoPath forms into these processes. You can base workflow decisions on data edited in the XML document and you can custom route documents using the built-in submit function of InfoPath. Additionally, information workers can detach these structured documents from the business process for exception handling, collaborate with co-workers by using e-mail to resolve the exception, and then re-insert the document into the business process.
InfoPath provides a number of options for connecting to back-end and middle-tier systems and for handling business process activities. Submit functionality can handle some workflow. Also, InfoPath integration with Microsoft SharePoint Portal Server (through Microsoft Windows SharePoint Services) supports a simple workflow process by enabling participants to check out an InfoPath form and check it in upon completion of their phase of the business process. However, InfoPath does not include an actual workflow engine.
For creating complex workflow solutions, InfoPath is a natural client choice for BizTalk Server. You can easily post data to BizTalk without writing code in InfoPath using, for example, built-in support in InfoPath for submitting XML over HTTP, BizTalk can then process the form and route it to another actor in the workflow, route the data to back-end systems based on workflow rules, or apply some other action.
In short, BizTalk Server provides orchestration capabilities to a business process based on InfoPath forms.
The sections below explore three basic scenarios that involve InfoPath and BizTalk interacting to facilitate a business process. The scenarios are not so much different approaches to using InfoPath and BizTalk as they are different workflow patterns that match business needs. To illustrate these workflow patterns, we use the example of a sales person filling out a report of a sales transaction. As we see, a complete business process can involve some combination of these scenarios.
Routing InfoPath Forms
The first scenario of InfoPath/BizTalk Server integration is the simplest. It involves using BizTalk to route an InfoPath form as an attachment. In our example, a sales person fills out a Sales Report (which contains the customer's information, the type and amount of product sold, and any comments about the transaction) in InfoPath and clicks Submit. Figure 1 shows the basic action, which has the following sequence:
The InfoPath client submits a form to BizTalk (through HTTP built-in support, script or Web service).
Based on rules (a name field within the Sales Report, for example), BizTalk routes the form to an e-mail recipient as an attachment.
The e-mail recipient opens the form.
Note that the sales person can submit the form again and route it to another person. In the end, the result is an XML file containing the sales data for this transaction. While not as evident in this scenario, that XML data becomes the central enabler for a whole series of business process capabilities.
Routing and Mapping Data from a Form into another Form
Using the example of the Sales Report, the simple routing described above is sufficient for the requestor to submit the form, BizTalk to route it to the approver, and the approver to open the form. However, clearly it would be valuable to add an approval step to the business process. At the same time, since this is a repeated business process, we want the ability to act upon and aggregate data from multiple sales reports.
In this case, we use BizTalk to orchestrate the more complex sequence of events, we use a SharePoint form library as a central document repository, and we streamline the business process by using the submitted form's XML data as a data source for a different InfoPath form. This is a great example of a "departmental" solution, since we are using the InfoPath XML files themselves as the source of actionable data in our business process. We are not connecting to any back-end systems that combine this data, but the results are similar. As shown in figure 2, the basic sequence is:
The requestor submits the Sales Report form as usual.
BizTalk submits the completed form to a SharePoint site.
BizTalk sends an e-mail with a link to the site.
The approver opens the link, which opens a new Sales Approval form and populates it with data from the submitted Sales Report form. The Sales Approval form uses the XML of the submitted Sales Report form as a data source.
While not impacted by the presence of BizTalk, the SharePoint form library provides some powerful business process features, such as the ability to expose form fields (such as customer, product sold, and sale amount) and sort all the submitted forms accordingly. You can also aggregate data from multiple forms into a single form (for example, as a monthly report).
Note that this scenario does require that the solution developer write some code to post the completed form to a SharePoint site and to send the e-mail message with the link to the item in the form library.
Routing and Mapping Data from a Form into a Back-End System
Continuing with the Sales Report scenario, a third option is to place data into a back-end system and then retrieve it upon request. The basic sequence here is:
The requestor submits the Sales Report form as usual.
BizTalk maps the XML data from the form into the proper locations in the back-end system (for example, a sales database and an inventory database). Unlike the previous scenario, the XML data from within InfoPath is now actively integrated into the back-end systems.
BizTalk routes a Sales Approval form to the Approver.
Steps 4 and 5 – The Approver opens the form and populates it with data from the back-end system. Data from the database is retrieved in real-time when the form is opened, assuring accuracy.
Submitting the Sales Approval updates the back-end system also.
Implementing the three scenarios described above does require some planning. With BizTalk 2002, most of this planning is centered on XML compatibility between InfoPath and BizTalk. The key issue is that InfoPath fully supports XML Schema specifications, while BizTalk Server 2002, an early implementer of XML, supports XML Data Reduced (XDR). As a result, solution developers need to write some code to allow BizTalk to work with an InfoPath form. For more information, including step by step labs on how to implement these scenarios, see the Microsoft Office InfoPath 2003 SDK.