The i-Technology Media!
Register | Log in
   
 
.NET  ·  AJAX  ·  CLOUD  ·  ECLIPSE  ·  FLEX  ·  OPEN WEB  ·  iPHONE  ·  JAVA  ·  LINUX  ·  OPEN SOURCE  ·  ORACLE  ·  PBDJ  ·  SEARCH  ·  SILVERLIGHT  ·  SOA  ·  VIRTUALIZATION  ·  WEB 2.0  ·  WIRELESS  ·  XML
Comments
Drool, Britannia? Is the UK Failing the Cloud?
By Roger Strukhoff
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Jan. 8, 2012 11:38 AM EST
read more & respond »
Cloud Expo on Google News
Did you read today's front page stories & breaking news?

Cloud Expo & Virtualization 2011 West
Keynotes
Oracle
Opening Keynote | An Enterprise Cloud for Business-Critical Applications
Abiquo
Day 2 Keynote | The Enterprise Cloud Tightrope - Balancing for Success
Akamai
Day 3 Keynote | The DNA of an Enterprise Cloud
DIAMOND SPONSOR:
Oracle
Many Clouds, Many Choices'Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Enterprise Cloud Best Practices - Town Hall - Join the discussion…
PLATINUM SPONSORS:
Intel
Progressing Toward the Federated, Automated and Client-Aware Cloud
New Relic
How to build an app with Twitter-like throughput
Rackspace
Computing in the Cloud Era
GOLD SPONSORS:
Gale Technologies
Practical Cloud Migration
IBM
Re-think IT. Re-inventing Business.
Intel/McAfee
Identity Driven Security in the Cloud
PerspecSys
Hackers Hackers Everywhere, Is My Public Cloud That Safe?
Red Hat
Unlock the Value of the Cloud
SHI
Mission Critical Applications and the Cloud - Myth or Reality?
SoftLayer
Not Your Grandpa's Cloud
Terremark
Integrating Enterprise Clouds
VMware
Upgrade to a vCloud
POWER PANELS:
Cloud Expo Silicon Valley: CTO Power Panel
Cloud Expo Silicon Valley: CEO Power Panel
Cloud Expo Silicon Valley: Cloud SuperStars Panel
Cloud Expo Silicon Valley: CloudNOW Panel
Click For 2010 West
Event Webcasts
Cloud Expo & Virtualization 2011 East
DIAMOND SPONSOR:
Dell
Dell & VMware Deliver the Enterprise Hybrid Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Are Financial Services Organizations Risking Security by Avoiding Cloud Computing?
Oracle
From Consolidation to Enterprise Private PaaS
PLATINUM SPONSORS:
Intel
Driving the Transformation to Next Generation Cloud Data Centers
Rackspace
The Inevitability of an Open Cloud
GOLD SPONSORS:
CA Technologies
Follow YOUR path to Cloud Computing
Interxion
Who Keeps the Cloud in the Air?
Microsoft
Patterns for Cloud Computing
PerspecSys
War in the Clouds: Are you ready?
ServiceMesh
The Big Win: Stop Playing Small-Ball with Your Cloud Strategy
Terremark
Evaluating Enterprise Clouds
Xiotech
Cloud Storage: Myths and Realities
POWER PANELS:
Cloud Expo New York: CTO Power Panel
Cloud Expo New York: CEO Power Panel
Cloud Expo New York: CMO Power Panel
Cloud Expo New York: Wrap-Up Power Panel
Click For 2010 West
Event Webcasts
Live Google News by SYS-CON!
Top Three Links You Must Click On


Feature
Introducing Microsoft InfoPath 2003, Part 1
Introducing Microsoft InfoPath 2003, Part 1

By: Thom Robbins
May. 22, 2003 12:00 AM

A few weeks ago I was meeting with the CIO of a local health care customer and his IT staff. They were explaining the various technology initiatives and projects that were occurring over the next year. What the CIO was the most proud of was that he had declared this a year of integration projects.

He had followed the IT trends closely and was seeing that now was the time to ride the Web services wave. With the release of Visual Studio .NET and Windows Server 2003 he felt comfortable in the platform. He and his staff were focused almost exclusively on the development and deployment of a Web services architecture to tie their back-end hospital systems and other various customer-facing systems together. The main goal he had dangled to his board was that he could reduce cost and increase efficiency through process automation and back-end integration. He had explained to them that Web services provide a clean and easy way to tie together their various back-end systems regardless of platforms.

As the CIO described it, their biggest remaining problem was the "mountain of paper" that had become the mainstay of their organization's daily life. Each piece of paper represented some portion of a vital health care process required for the hospital to function properly. They ranged from patient admission to nursing orders. It became clear through our conversation that ASP.NET combined with VB front-end applications wasn't the sole clear answer for front-end data collection. Web services clearly answered the back-end integration requirements, but there was still a definite need for offline access and a quick and easy way for data collection. I explained that a new product called InfoPath 2003, which is part of the new Microsoft Office System 2003, was designed to solve that very problem. In the first part of this two-part series I'll show how you can use InfoPath and Web services to solve not only this CIO's problem but similar problems within your organization. In Part 2 I'll explore further ways that you can integrate InfoPath with Microsoft BizTalk Server 2002 to create robust workflow applications.

The design goal of InfoPath 2003 is to streamline the process of gathering information by enabling teams and organizations to easily create and work with rich dynamic forms. The real key to InfoPath is that the data collected can easily be shared and integrated with a variety of back-end business processes because of the native support of customer-defined XML. The use of XML as the basis of InfoPath provides a built-in reusability for XML-enabled applications. Additionally, InfoPath provides the native ability to consume XML Schemas, Web services, SQL, and Microsoft Access databases.

What Is an InfoPath Solution?
By definition an InfoPath solution consists of either a form template or a set of files that are combined to provide the necessary semantic information to the InfoPath clients to generate a form and output the resulting XML (see Table 1). These files can be packaged separately or combined into a single .xsn file. These groups of files are in a hub-and-spoke relationship with the form definition file providing the entry point. This file, by default named manifest.xsf, consists of an XML document that uses the namespace and associated schema of http://schemas.microsoft.com/office/ infopath/2003/solutionDefinition.

An InfoPath solution can be created using the design mode of the InfoPath 2003 client or authored independently. The client application supports round-tripping so that the form definition file and the various XSLTs can be modified by the solution designer and then reloaded within the InfoPath client. This gives additional design and extensibility capabilities outside of the InfoPath environment.

An InfoPath solution is run by loading an XML instance that is associated with a given form. The information in the form definition allows InfoPath to display the XML data and to define the user interface, types of interactivity, and validation rules. During processing, the XML data instance has a processing instruction (PI) pointing to the form definition file that leads to the loaded form along with any specific instance data. The form definition file is really the key to the InfoPath document structure and contains a variety of information that is required for the form to load and process. This includes a unique forms identifier and metadata that is used for publishing and deployment information. The form definition file is also where the XML DOM schema, business logic and event handlers, view definition, and user interface are stored.

When you create a form in design mode using the InfoPath client you are actually creating a form template. Every InfoPath form is based on a form template. Form templates or the .xsn files define the layout and functionality of a form including the XML Schema that determines the structure of the data when the form is filled out by a user. Whenever a user fills out a form, the form references the form template it is based on regardless of whether the form is local, on a network share, or installed in a Windows Sharepoint Services forms library.

The InfoPath security model is similar to that of Internet Explorer. Form templates by default run in a sandboxed environment and this protects the system from potential malicious code. As an alternative, InfoPath forms can be deployed through an installation program (MSI); this will grant them a higher permissions level as they are running on the local machine. If you want to identify the source of the form you can look at the bottom of the InfoPath client. This will show the running location of the InfoPath form. A URL identifies the form as hosted on a Web server or by a URN if they are deployed locally.

Creating a Solution
Now that we understand the basics of an InfoPath solution, let's go ahead and create a form. When trying to decide what form to implement using InfoPath, my health care customer decided to design a form that had a corresponding Web service that captured new patient information already developed and implemented in their production environment. This Web service acted as the front-end data collection point for their back-end MUMPS system. So they wanted to extend the Web service into an InfoPath solution that could be filled out by either patients from a kiosk or hospital staff that collected the required information during the interview process.

InfoPath provides several ways to develop forms. In this example, we already had a Web service that would act as the data source. In order to create the connection between InfoPath and the Web service you simply select the data source wizard from the design menu and select Web service as the provider (see Figure 1). The wizard accesses the WSDL of the selected Web service and generates a list of fields based on the service description of the Web services. In turn this becomes the generated list of fields that we use to create our InfoPath form. If InfoPath is unable to access the complete data structure returned by the operations of the Web services form, designers are prompted to specify some sample values for all the input arguments needed by the operation. This data is then used to make a call into the selected operation and then design the data structures based on the received output.

InfoPath is capable of building a form template from pretty much any arbitrary XML Schema that is valid according to the standard W3C specification. There are some schema constructs that InfoPath is not capable of supporting in this version. You will want to keep these in mind as you develop your Web services:

  • Schemas that define abstract complex types
  • Schemas that define content models with any nodes that have a maxOccurs greater than 0
  • Schemas in which a choice node has a direct child sequence or list

    Within the InfoPath design environment all work is done through the various task panes. Each of the task panes represents a specific design activity. These include layout, controls, data source, views, and publishing. After you have completed the data source wizard, InfoPath will place you in the data source task pane with a list of the design fields and a blank form to begin placing your data elements.

    Build the Form
    Now that we've successfully created a connection to our Web service and created an instance of our XML data we are ready to build our data entry form. The easiest way to build a form is to build around table structures, similar to building a Web page. Tables will help to control the formatting and provide an easy alignment for the various fields that you can place on your forms. The layout task pane provides a variety of table options that you can drag onto your blank form.

    InfoPath provides two important types of sections or tables that can be used to improve the formatting of your form. The first is the repeating table. In this table each column represents a field and each row represents an additional occurrence of the group of fields. This would be an easy solution if, for example, you were looking to collect a series of patient insurance information and didn't want to limit the number of items that someone could enter. The second is the optional section. These are sections that can be inserted and removed by users while they fill out forms. As a form designer you can specify whether fields or groups of fields should appear by default in the blank form or if they should appear only when the user inserts them. For example, if I wanted to allow a notes section on my form I could allow the user to determine if he or she wanted to include the section or not. This allows the user to remove the entire section without having to delete the text and leave a blank field.

    For the patient information form there were two sections that we needed to develop. The first was a title or header section that contained the form name and instructions for completing the form. The second area was the actual data area. This area contains the fill-in fields that users will complete as part of the form.

    Moving the data fields on the tables is an easy drag-and-drop operation from the data source task pane to the columns within the table. It is important to understand that based on the data types specified by the WSDL of the Web service InfoPath will associate a specific control type. For example, if you look at the date of birth field you will see that a date picker control was automatically selected. If you decide that you want to change the default associated control you can right-click and select the specific control type that you want. Additionally, if you want to validate which field a particular fill-in field is bound to, you can hover your mouse over the field. A pop-up window with a green indicator and a schema field name will identify that your field is properly bound to the data source.

    After placing all the required fields and saving the form template you are ready to fill out and submit the form to the bound Web service. In addition to Web service submission end users also have the ability to export their form to a static Web page, to Excel, or to someone through e-mail. As you begin developing InfoPath solutions, e-mail provides an easy out-of-process workflow step-for example, if you wanted to notify someone via e-mail that a particular patient has entered the physician's office.

    Data Formatting and Validation
    At this point we've created a fill-in form that could be distributed and used. The problem is that we haven't included any of the formatting or business logic needed to validate the entered data. InfoPath provides designers with the ability to control the formatting of plain- and rich-text boxes, sections, and repeating tables based on a set of user-defined conditions. As you create a condition, you specify the font, styles, background color, and even whether to hide the specific control. Conditional formatting is stored as part of the XSLT and is applied to form fields whenever the specific set of conditions is met. For example, one of the requirements for the patient information form was that required fields were to have a red background. Conditional formatting statements are entered through the field's display options, by selecting the conditional formatting tab. Within the tab, building the expression is done by selecting the various fields and filling in the required conditions (see Figure 2).

    One of the main requirements of most data-driven forms, in addition to conditional formatting, is validation. InfoPath provides three levels of validation: schema-based validation, declarative or rules-based validation, and custom script. Depending on the complexity of your form it's possible to have all three levels implemented on a particular field. Schema-based validation and then declarative script-based validation are defined based on an InfoPath event model, so the forms developer has full control over when this occurs. InfoPath allows a form to be saved without successfully passing validation but will prevent submission to the data source until all checks are successfully completed.

    For our patient information form we used an existing Web service. This allowed us to take advantage of schema-based validation. Schema-based validation occurs whenever a user fills in a form. After data is entered in a field and the user moves to another field the data is immediately checked against the schema. If the data fails the schema, check the marked field with a red dashed border. The user can then right-click the marked field and be given feedback as to the data type or schema requirements. As we are bound to a Web service our schema is predefined. For example, if I entered text into the age field, which is defined as an integer, a schema validation error would occur. By default InfoPath will check for an invalid data type, specified range, and required fields as defined within the schema definition.

    The declarative engine is important based on the context of the user completing the form. For example, one important scenario in our new patient form was that all patient ages were greater than zero. The rules engine is accessed from the data validation tab of the field properties. It is another fill-in field dialog box that allowed us to visually build rules. If an applied rule fails, you can provide either a pop-up box or a tool tip as feedback to the user. For our scenario we felt it was better to provide the modal dialog as the preferred feedback mechanism.

    InfoPath also provides an event model to allow programmatic access. In this scenario a developer can prewire events to script components that can occur within either the form's data fields or the entire form. Form-level events include form open, view switches, form submission, and data imports. At the field or node level InfoPath provides events around data change events (see Figure 3).

    InfoPath provides a rich model of events that can occur both at the document and node level. In order to create your application correctly it is important to understand when these events are fired. Events associated with document lifestyle occur in the order shown in Table 2. Events associated with node-level data occur in the order shown in Table 3.

    Events are created through script components that run in response to the type of trigger assigned. Currently, InfoPath supports either VB script or JavaScript components. Script language is defined at the form level using the InfoPath system options. The design of InfoPath requires that the client application is used to associate the event name, and script development be done through the Microsoft Script Editor (MSE). The event function is referred to within the form definition file, which means that you aren't able to change the function name or arguments. Figure 4 shows the form in run mode, and Figure 5 shows the architecture of how this solution would be developed.

    Summary
    Through this article we have developed a fully functional form for my health care customer to collect new patient information. Once collected and validated this information is automatically submitted to their back-end Web service.

    Stay tuned for the second part of this series where we will extend this solution to leverage the back-end services of Biztalk Server 2002. When InfoPath is combined with this, you can create some dynamic workflow applications for your enterprise.We have covered only a very small portion of the InfoPath environment in this article. I leave it up to you to discover how InfoPath can help you reduce your "mountain of paper" and explore the further capabilities of the InfoPath 2003 application.

    Resources
    Several files are available for download at www.sys-con.com/xml/sourcec.cfm, including NewPatient.xsn, the actual form; Savedform.xml, a saved version of the form; and Webview.mht, a saved version of the form for the Web.

    Published May. 22, 2003— Reads 20,187 — Feedback 1
    Copyright © 2003 SYS-CON Media, Inc. — All Rights Reserved.
    Syndicated stories and blog feeds, all rights reserved by the author.
    Related Links
    ▪ Figure 1
    ▪ Figure 2
    ▪ Figure 3
    ▪ Figure 4
    ▪ Figure 5
    ▪ Source Code
    ▪ Figure 6
    ▪ Figure 7
    ▪ Figure 8
    About Thom Robbins
    Thom Robbins is a senior technology specialist with Microsoft. He is a frequent contributor to various magazines, including .NET Developer's Journal and SOA Web Services Journal. Thom is also a frequent speaker at a variety of events that include VS Live and others. When he's not writing code and helping customers, he spends his time with his wife at their home in New Hampshire.

  • Add Your Feedback

    In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    #1
    Maia London commented on 20 Aug 2003

    What's the pub date on these articles?
    Introducing Microsoft InfoPath 2003 Part 1
    Introducing Microsoft InfoPath 2003 Part 2

    Thanks,


    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

    SYS-CON Featured Whitepapers

    ADS BY GOOGLE

    Breaking Java News
    Tropicana Student Housing Announces Video Contest Winners
    NASA Selects Arizona Teacher to be "Agent of Change" For STEM Education
    Harwood Feffer LLP Announces Investigation of Advance America, Cash Advance Centers, Inc.
    Harbinger Group Inc. Announces That Its Chief Financial Officer is Resigning Effective April 30, 2012 and Expects to Appoint a Successor Within That Period
    Brookfield Soundvest Funds Announce Distributions
    AFPM Warns of Adverse Effects of E15 Use
    Harwood Feffer LLP Announces That a Securities Class Action Lawsuit Has Been Filed Against Kinross Gold Corp.
    Eurotin: Resignation
    Harwood Feffer LLP Announces Investigation of CVR Energy Inc.
    Third Age Suit™ Makes Its First Trip to The United States

    ADVERTISE   |   MAGAZINE SUBSCRIPTIONS   |   FREE BREAKING-NEWSLETTERS!   |   SYS-CON.TV   |   BLOG-N-PLAY!   |   WEBCAST   |   EDUCATION   |   RESEARCH

    .NET Developer's Journal - .NETDJ   |   ColdFusion Developer's Journal - CFDJ   |   Eclipse Developer's Journal - EDJ   |   Enterprise Open Source Magazine - EOS
    Open Web Developer's Journal - OPENWEB   |   iPhone Developer's Journal - iPHONE   |   Virtualization - Virtualization   |   Java Developer's Journal - JDJ   |   Linux.SYS-CON.com
    PowerBuilder Developer's Journal - PBDJ   |   SEO / SEM Journal - SJ   |   SOAWorld Magazine - SOAWM   |   IT Solutions Guide - ITSG   |   Symbian Developer's Journal - SDJ
    WebLogic Developer's Journal - WLDJ   |   WebSphere Journal - WJ   |   Wireless Business & Technology - WBT   |   XML-Journal - XMLJ   |   Internet Video - iTV
    Flex Developer's Journal - Flex   |   AJAXWorld Magazine - AWM   |   Silverlight Developer's Journal - SLDJ   |   PHP.SYS-CON.com   |   Web 2.0 Journal - WEB2
    Apache   |   CMS   |   CRM   |   HP   |   Oracle Journal   |   Perl   |   Python   |   Red Hat   |   Ruby on Rails   |   SAP   |   SaaS

    SYS-CON MEDIA:   ABOUT US   |   CONTACT US   |   COMPANY NEWS   |   CAREERS   |   SITE MAP
    SYS-CON EVENTS:   |  AJAXWorld Conference & Expo  |  iPhone Developer Summit  |  Cloud Computing Conference & Expo  |  SOA World Conference & Expo  |  Virtualization Conference & Expo
    INTERNATIONAL SITES:   India  |  U.K.  |  Canada  |  Germany  |  France  |  Australia  |  Italy  |  Spain  |  Netherlands  |  Brazil  |  Belgium
     Terms of Use & Our Privacy Statement     About Newsfeeds / Video Feeds
    Copyright ©1994-2008 SYS-CON Publications, Inc. All Rights Reserved. All marks are trademarks of SYS-CON Media.
    Reproduction in whole or in part in any form or medium without express written permission of SYS-CON Publications, Inc. is prohibited.
     
    close this window