Click here to Skip to main content
Click here to Skip to main content

Information Bridge 1.5 Walkthrough - Part 1

By , 2 Apr 2005
Rate this:
Please Sign up or sign in to vote.

Purpose

The purpose of this article is to give you a primer on Microsoft Information Bridge Framework (IBF) 1.5. Microsoft released the first version of IBF last year and has recently released the 1.5 Service Pack. This service pack adds many new features that make this technology much more inclusive and a lot easier to work with. I will be discussing and demonstrating the new features of IBF 1.5 throughout this article. I am also including a complete sample and walkthrough that will get you up and running on this technology.

There are many documents on the Microsoft website that describes and outlines IBF (view References at the end of this article). There is also a great sample solution that you can download, install and use to see a fully integrated IBF project. I spent many late nights trying to decipher the documentation, along with the sample application. I struggled to mesh the two pieces together because there was no simple walkthrough that took me from "A" to "Z". Once I was able to complete a solution on my own, using as many of the features as I could, I now am more comfortable with the tool set and feel that it is a tremendously powerful way to create applications.

The one area of documentation that I feel is lacking from the Microsoft Communities, is a good set of walkthroughs on how to accomplish some basic, as well as advanced concepts of Microsoft Information Bridge. This article is meant to take my learnings, on how to do these concepts, and provide you with a clear, step by step walkthrough that you can use to get a jump start on using this powerful technology. But before we jump into the solution, I want to provide you with a solid baseline, regarding Information Bridge.

What is Information Bridge?

Microsoft Office Information Bridge is a set of tools and technologies that are used to extend the functionality of Microsoft Office. Information Bridge enables companies to create light weight, extremely powerful, connected applications using the power of web services, .NET and Microsoft Office. So what does that mean? It means that, if you have a need to connect your backend systems (Accounting systems, HR applications, Payroll data, etc.) to Office (Word, Excel, Outlook), without having to worry about a huge development and deployment infrastructure and want to use already built in functionality of Office (Spreadsheets, Documents, Emails), Information Bridge is a great option.

Business Needs

Companies have a need for applications that are flexibly, manageable, secure and can connect to existing Line of Business (LOB) systems. These applications should have a familiar interface; such as Word, Excel or Outlook and users shouldn't have to leave their current environment to conduct their work. This is why Microsoft Information Bridge is such a great solution. It enables companies to create powerful applications, quickly and with little cost or deployment concerns.

What Information Bridge is not?

It is important to note, that Information Bridge is not the be-all, end-all solution for every need. It is not meant to replace, rich client server applications, web services or web applications. It is meant to supplement those applications and extend them to the Microsoft Office platform. If you are using Visual Basic For Applications (VBA) in Office, you might want to consider using Information Bridge instead, as it will give you a more robust, extendable and richer user experience.

Assumptions

Before I begin the project of creating an Information Bridge Solution, there are several prerequisites that I assume you are already familiar with and have previously configured in your development environment.

  1. You are familiar with the Microsoft Visual Studio .NET 2003 development platform.
  2. You have access to the SQL Server NorthWind database and are familiar with the database structures.
  3. You have the Information Bridge 1.5 Server installed and configured on your server, as well as the IBF 1.5 SDK.
  4. You have the full installation of Microsoft Office 2003.
  5. You understand the following concepts: Web Services, .NET C#, .NET Windows Control development, Microsoft Office 2003 Word, Excel and Outlook and Office Smart Tags.
  6. You have worked with XML and XSLT.
  7. You know how to sign an assembly with a strong name.
  8. You have the Smart Tag SDK installed on your system.
  9. You have downloaded the Images & Listings at the top of this article.

Information Bridge User Interface

The User Interface of Microsoft Information Bridge is visible from the following components:

The Office Task Pane

The Office Task Pane is a dynamic window that appears in Office applications (Word, Excel, Outlook and Internet Explorer) and changes depending on the context. To view the task pane, open Microsoft Word, and click on the menu bar: View --> Task Pane.

The Information Bridge Task pane is the main information display component for IBF applications. You can consider this as your .NET Windows Form, where you can display information, perform actions, etc. The Information Task Pane is broken up into three areas: the Search Pane, Reference Pane and the Solution pane. These panes are accessible by using the tab on the bottom of the pane (Refer to Figure 1) and are programmed individually by using the IBF Metadata Model. I am not going to explain this task pane in detail, please review the References link at the bottom of this article for the official Microsoft document on the task pane.

Smart Tags

Microsoft Smart Tags are those little Information Icons that appear over text in an Office application that is underlined by a purple dotted line (Refer to Figure 2). This icon means that certain text was recognized and specific actions can be performed from this recognized text. In Information Bridge terminology, it is where you can initiate an Information Bridge Action, and display specific context information on the Task Pane.

Metadata

Metadata is the heart of Information Bridge. All actions flow through this metadata layer, which is why Information Bridge is so powerful. There is such a robust metadata model, that modifying, deploying and developing with Information Bridge is as simple as writing some XML and XSLT elements. Actually, you can develop a complete Information Bridge solution, entirely in metadata, without writing a single line of code.

Once again, there is a lot of documentation on the Information Bridge Metadata model, so I will not go into detail within this article. But I do feel it is important to give you a high level view of the metadata so that you can follow the terminology.

  • Metadata Scope

    This is the high level metadata grouping. Consider this like your .NET solution, or namespace. An example would be NorthwindIBFData.

  • Entities

    This is a high level object or scope. Consider this like your .NET project or object, within the solution. An entity contains Actions, which are the main method calls in an Information Bridge solution. An example would be Customers, or Orders.

  • Ports

    This is your connector to the Web Service data, CLR objects or external files to be used in your solution. An example is a reference to the .NET assembly that contains your Windows Forms object that will get loaded into the Information Bridge Task Pane.

  • Operations

    This is the lowest level command that executes. An example would be your individual Web Service WebMethod call, like GetCustomers.

  • Transformations

    This is the metadata that modifies data so that it conforms with other Information Bridge elements. An example of this artifact is some XSLT code that transforms incoming data so that it complies with another IBF operation.

  • Schemas

    This metadata element is where you define and validate your high level objects. An example of this would be your XSD that describes your Customer or Order.

Visual Studio Integration

Information Bridge is integrated into Visual Studio in several ways:

  1. After installing the Information Bridge Server component, you will be able to create an Information Bridge Metadata Solution. This solution type enables you to create an IBF solution by using the Metadata toolbar and integrated wizards. (Refer to Figure 3)
  2. You can develop all of your ports using .NET Web Services and .NET Windows Forms components.
  3. You can create your Office Automation components and Smart Tags using any .NET language.

Walkthrough

Ok, now for the fun part. This walkthrough will provide you with instructions for creating a complete IBF solution using the newly released 1.5 framework. I am going to break it into two parts. Part one will focus on the basics of creating a simple project. Part two will focus on some of the advanced features of Information Bridge.

The solution I am going to create will revolve around the standard NorthWind database. I will be using this model, because I figure that most of you are familiar with the database schema and if you aren't, there are lots of documents on it that you can get from Microsoft.

Part 1

Part one will be creating a simple IBF solution that will enable users to retrieve details on NorthWind Customers from within Microsoft Word. From Word, a user should be able to type in a NorthWind customer ID, from there a Smart Tag should enable the user to get the details on this customer. The tasks involved are listed below.

  1. Create a .NET IBF solution.
  2. Create an IBF compliant Web Service.
  3. Use the 1.5 Metadata Guidance Task pane to do the following:
    1. Import your IBF compliant web services.
    2. Create your first Entities and Actions.
    3. Create a .NET Windows Form Region.
  4. Test your IBF solution.
  5. Create a basic Smart Tag Recognizer.
  6. Test your application in Word.

Part 2

Part two will expand on part one by enabling the user to perform specific actions from a custom Smart Tag, like: Get All Customers, or See Custom Details. We will also allow the user to search for customers from the IBF Search Task pane. Finally we will create a standard Word Template and attach an IBF schema that will allow the user to view, update and add customer information directly from the IBF Task Pane. The tasks involved are listed below.

  1. Custom Smart Tag Actions and Menu Items.
  2. IBF Search Panes.
  3. Microsoft Word Attached Schemas.
  4. Working with Office from the IBF task pane.
  5. Deployment.

Part 1

Creating an IBF solution

The IBF solution is the main solution that contains all the other projects for working with IBF. This solution will contain the IBF metadata project, web services project, Windows control library project and the smart tag project. We will start the walkthrough by creating a solution and adding the IBF Metadata project.

  1. Open Visual Studio and create a new blank Solution. I called my solution, IBFDemo.
  2. From the File menu, select Add New Project and select the "Information Bridge Metadata projects" type, then select the "Metadata" template. Give the project a name, like IBFNorthwind_MD, and hit OK (refer to Figure 4). The first thing you will notice is two new Visual Studio dockable windows.
    • Metadata Explorer – This window is where you use Visual Studio to work with the IBF Metadata.
    • Metadata Guidance – This window is a new feature in IBF 1.5 that guides you through the process of creating an IBF solution.

    If you don't see these windows, then you can view them by selecting View --> Other Windows --> and then clicking on either the Metadata Explorer or the Metadata Guidance.

  3. Once you add this project to your solution, select the project in the Project Explorer, and in the Properties window, modify the Location to point to your IBFWriteService.asmx. This will let the project know where the IBF services are located at.

Creating your IBF Web Services

To create an IBF compatible Web Service, you simple create a standard web service, but the results should be from an object that can be serialized. For example, a Customers class should be created with the appropriate XML elements and attributes exposed so that the schema can be shared within IBF. The below steps will create a Customer schema object, a Customers collection object, a CustomerID schema object and a series of Web Methods to return the Customers information. These Web Services will be used in IBF to search for a Customer, create a Customer Smart Tag Recognizer and eventually view all Customers.

  1. Add a new Web Services project to the existing solution. In this example, I titled the Web Service project, IBFNorthwind_WS.
  2. Rename the default Service.asmx file to IBFNorthwindData.asmx.
  3. Create a new class called, Customer.cs, and create the appropriate Customer elements you want to expose in this schema. For this example, I will be exposing the CompanyName, ContactName, ContactTitle, City and Phone. (Refer to Listing 1)
  4. Create another new class called Customers.cs, and inherit from the System.Collections.CollectionBase. Modify the methods to expose the schema class you defined in the previous step. For this example, we will be creating a collection of Customers. (Refer to Listing 2)
  5. Create a third class called, CustomerID, that will expose the inputs to select a specific Customer. In this example we will be using the CustomerID as the input to select a specific Customer. (Refer to Listing 3)
  6. Create a web method that populates and returns the Customers collection class object. (Refer to Listing 4)
  7. Create a web method that returns a single Customer object. (Refer to Listing 5)
  8. After you create the previous Web Methods, you can test them to make sure that data is being returned correctly from the NorthWind database.

Note:

Remember to add the AppSettings to connect to your local NorthWind database. Also you will need to create a test method to test the individual GetCustomer Web Method because it expects a CustomerID object as the parameter.

That's all there is to it. You now have a corking, IBF compliant Web Service.

Using the 1.5 Metadata Guidance

The next step in our IBF solution will be to create the Metadata. As I mentioned previously, the Metadata is the heart of the system and it controls all the operations in the project. We will begin by creating the IBF base Metadata, using a template provided by the Microsoft IBF SDK. We will then add the appropriate Ports and Operations to support our Web Services by importing the WSDL into IBF. Finally, we will create the Actions and Regions to display the Customer detail data.

  1. Create the base IBF Metadata by importing the template schema. This template schema contains all the Operations, Ports, Transformations, etc. to get us started. By importing this template, we will not have to create all the XML and XSLT by hand to support our project. Start by selecting your Metadata project from the Visual Studio Solutions pane. Then on the Metadata Guidance window, click on the "Import Metadata Dialog Box" hyperlink. This will allow you to import Metadata from an XML file, an existing IBF service, WSDL or any .NET assembly. For this task, we want to import the standard Metadata scope template. This as an XML template and is available if you download the IBF Resource Kit. The file is named: Microsoft.InformationBridge.Framework.UI.InformationBridgeScope.Metadata.xml. Click OK to import the template. (Refer to Figure 5)

    After the import, you will notice in the Metadata Explorer window that you will now have a complete Metadata Scope to work with. Rename the default name of this scope from InformationBridge to our specific Scope name. In this case, I am calling it NorthwindIBF. (Refer to Figure 6)

  2. Now that we have the base IBF Metadata, we need to import our WSDL, from the Web Services we created earlier. Once again, on the Metadata Guidance window, click on the "Import Metadata Dialog Box" hyperlink. But instead of selecting the XML File radio button, select the Web Service WSDL option. Browse to your Web Service and click the OK button. After clicking the OK button, you will be able to specifically select the Web Methods you want to import, as well as what Metadata Scope you want to import them into. For this walkthrough, we will be selecting the NorthwindIBF Metadata Scope as well as the GetCustomer and GetCustomers web methods. (Refer to Figure 7 & 8)

    After you select the Web Methods and click OK, you will be prompted to Replace or Merge the Metadata. Click Merge, to merge this new Metadata with the existing solution Metadata.

    After the import, you will notice that several key elements have been added to the Metadata, including: Ports, Schemas and Operations. These new elements will provide IBF with the hooks to initiate and display the Customers data.

  3. The next step is to create the Views of the data. The Views of the data are how the data will be displayed in the region. On the Metadata Guidance window, click on the "Service Metadata Creation Wizard" hyperlink. This will begin the tasks of creating an Entity, View and View Locator elements. A brief description of these elements are as follows:
    • Entity – Definition is provided above.
    • View – A View is a subset of the Entity. For example, for the Customers Entity, we might have a Detail View of a Customer, or we might have a List View.
    • View Locater – This is the pointer to where the View data is located. This connects the View to the data.
      1. The first screen of the dialog allows you to select the Metadata Scope to add this Entity. Select the NorthwindIBF Scope. (Refer to Figure 9)
      2. The second screen creates the actual Entity. On this dialog you will create a new entity, called Customers. Then you will select the Default Reference Schema, which is the schema that defines this Entity. Since this will be the Customers Entity, we will use the Xsd.Customers Schema that was automatically imported by the WSDL Import Wizard. We will also make this the Default Entity. This will be used later when we attach an IBF Schema to a Word document. (Refer to Figure 10)
      3. The third screen allows us to create a View. We will be creating a View to show the details of a single Customer. To do this, enter a View name and then select the Schema for this View. In this example, since I want this View to show the details of a single Customer, I will be creating a Customer_View View and I will select the Xsd.Customer Schema. (Refer to Figure 11)
      4. The final step is to create a View Locator. Remember, this is the pointer to where the View will get the data. In this example, I will select the Soap.GetCustomer Operation. (Refer to Figure 12)
      5. Click through the next screens and Finish the wizard. Now you will see the Customers Entity in the Metadata Explorer window. (Refer to Figure 13)
  4. The final Metadata step is to create an IBF Region to display the Customer details. To do this, we will again use the IBF Metadata Guidance window. After completing this step, the wizard will create an Action, as well as a fully functioning Windows control to display the Customer details. You will not even have to write a single line of code. So lets begin, on the Metadata Guidance window click on the "Create Region Wizard" hyperlink. This will bring up the Region and Action wizard.
    1. On the second screen of the wizard, enter a new Metadata Solution name, such as IBFNorthwindMDSolution. This lets you group together artifacts from IBF into a common solution. (Refer to Figure 14)
    2. The third screen will be selecting a Schema, Entity and View, from the existing Metadata we created above. For this example, we will use the NorthwindIBF Schema, Customers Entity and the Customer View. (Refer to Figure 15)
    3. The fourth screen of the wizard, we will create our Action. An Action is the lowest level of an execution step. For this example, we will be creating a new Action named, GetCustomerDetails_Action. Then add the Region Caption and Region Description. These attributes will be like the Title of your .NET Windows Form and will appear in the IBF Task pane. (Refer to Figure 16)
    4. The fifth screen lets us create the actual Region. This is your .NET Windows Forms control that will display the results on the IBF Task Pane. You can choose to display simple HTML, or a complex .NET Windows Control Form. For this example, I want to show the details in a C# Windows Forms Control, in a new project called, IBFNorthwind_ControlLib. By selecting this option, the wizard will create a new project, add it to your solution, create the control, fields, etc. and hook it all together. (Refer to Figure 17)
    5. The final step will be setting the Region Properties. This is where you define the class name that the IBF wizard will create. It also allows you to set the Region Caption and Description properties. Finally set the type of region, Expanded, Collapsed, or Non Collapsible. (Refer to Figure 18)
    6. Click through the remainder of the wizard and let the IBF wizard do its magic. Once it completes, you will notice that a new project has been added to your Visual Studio solution. This project contains the Customer XSD, the Customer Schema class file and the Customer ControlDetails Windows control. You will also notice that you now have a new Action, under the Customer_View in your Metadata.
    7. Build the new IBFNorthwind_ControlLib project.

This completes the creation of the Services Metadata. By simply clicking through a few of IBF's wizards, we were able to create a fully functioning IBF solution that connects to our Northwind Web Services.

Testing your IBF solution

Now we are ready to test this Customer Details IBF solution. But, before we do that, we need to properly set the security settings on your assembly and machine to view this Windows Form within Office. To do this, we need to sign your assembly with a strong key and then increase the Trust Level of the IBFNorthwind_ControlLib assembly. To do this, follow the instructions below.

  1. I will not go into details on signing your assembly with a strong name and key. But you need to sign the IBFNorthwind_ControlLib assembly that was created in the above Region creation wizard.
  2. To increase the Trust Level of the assembly, open the .NET Framework Configuration Tool. This is located on the Administration Tools Start Bar on your system. (Refer to Figure 19)
    1. Next click on the "Runtime Security Policy" folder, to view the Code Access Security Policy Window. (Refer to Figure 19 above.)
    2. Click on the "Increase Assembly Trust" hyperlink.
    3. On the first wizard pane, click the radio button option to "Make changes to this computer", then click Next.
    4. On the second wizard pane, browse to the IBFNorthwind_ControlLib assembly that the IBF wizard created above.
    5. On the third wizard pane, bump up the Trust Level to Full.
    6. Finish the wizard.
  3. Now our IBF project is ready to test. To initiate the Customer Details IBF Project, follow the instructions below:
    1. Set the IBF Metadata Project as the Start Up Project. In this example it is the IBFNorthwind_MD project.
    2. On the Metadata Explorer window, click on the "GetCustomerDetails_Action" action. This is the Action we created from the IBF Region Creation wizard above. Then right click on the Action and select Build and Execute.
    3. From the Build and Execute window, select the View Locator that you need to use to pull data into this Action. For this example, we will be using the "Xsd.CustomerID". Then we need to provide the Action with the input. When we created the GetCustomer Web Service, the input was the Custemer_ID Schema object. So we need to pass this to the Action, in order to view that specific Customer details. The syntax is as follows:
      <CustomerID CustomerID="LETSS" xmlns="CustomerID-Data" />

      This can also be found, by running your Web Service from Visual Studio and clicking on the Web Service you want to execute in the Action. (Refer to Figure 20) The highlighted text is the Input to the Action. The full Build and Execute window is displayed in Figure 21.

    4. If all worked properly and your server is configured correctly then you should be seeing the IBF Task Pane with the Customer Details of the "Let's Stop N Shop" Company being displayed. You now have a complete Windows Dialog Pane that can expand and collapse, integrate into Office and display information from a Web Service. And the only code that we had to write was a simple web service.

      If something went wrong, there will be a Yellow Warning Icon in the bottom right corner that you can click on and get the stack trace of the error. (Refer to Figure 22 for the successful IBF Window)

    5. Once your solution is working properly it is important to Publish the Metadata to the Metadata server. To do this, click on the Publish Metadata Icon on the toolbar of the Metadata Explorer window. Then type in the path to your IBF Write Service.

That's all there is to it. We created a simple application that allows us to display any NorthWind Customer in an IBF Task Pane. This application can now be implemented in any IBF compliant applications, such as Word, Excel, InfoPath, Outlook or even Internet Explorer. But how do we initiate this IBF Action from Office. Well, the primary way is to create a Smart Tag that will recognize Customer IDs and then allow the user to view the details. That's exactly what we will create next.

Creating a basic Smart Tag Recognizer

The last walkthrough, in Part 1 of this solution, will be to initiate the Customer Details IBF window from a Smart Tag. The goal is to be able to type a Customer ID into Word and then from the Smart Tag menu, initiate the call to the IBF Action to bring up the IBF Task Pane, displaying the appropriate Customer Details Region.

To do this, we will need to do several steps:

  1. We need to add a new C# Class Library Project to our existing solution.
  2. We will create the SmartTag Recognizer object.
  3. Next we will import the Common Information Bridge Metadata Scope. This Metadata is common to all IBF applications. All IBF Recognizers and Actions must use this Metadata Scope to function. We will import the IBF Metadata Template, then we will add our Recognizer and Action to this scope.
  4. We then will add the appropriate Metadata elements and attributes to the Common IBF Metadata Scope and publish the Metadata.
  5. We will Test the Recognizer from Word.

Step 1

First we will add a new project to our solution to house the IBF Smart Tag objects.

  1. Add the new C# Class library project to the existing solution. In this example, I called this IBFNorthwind_ST.
  2. Add the IBF references to the Visual Studio project.
    • Microsoft.InformationBridge.Framework.Interfaces.
    • Microsoft.InformationBridge.Framework.UI.Interop.
  3. Add the SmartTagLib reference. This is a COM reference and if you don't have it, you can download the SmartTag 2.0 Resource Kit from MSDN.
    • Microsoft.Office.Interop.SmartTag.
  4. Add a reference to the System.Web assembly.
  5. Add a Web Reference to the IBFNorthwind_WS we created above. Since we want this Smart Tag to be dynamic and pull the Customer IDs from the NorthWind database, we can use the Web Method we already created to populate the recognizer. You could just as easily, hard code a list, or pull it from some other source, but for this example, I wanted to reuse our Web Services.

Step 2

Second we will start writing the code to create an IBF Smart Tag recognizer.

  1. Start by renaming the class file and the class name to IBFNorthwindRecognizer.
  2. Import the proper IBF and Smart Tag Namespaces. (Refer to Listing 6)
  3. The IBFNorthwindRecognizer class should inherit from the IBF IRecognizer interface. By inheriting from this class, you will need to implement the following methods and properties: IRecognizer.Recognize and IRecognizer.Initialize.
  4. The first method we will implement is the IRecognizer.Initialize routine. This method loads the values that you want to be recognized, into the recognizer object. For this example, we will simply call the GetCustomers Web Method and store the results in a public variable, so that we can access it from the IRecognizer.Initialize method. (Refer to Listing 7)
  5. The next task will be creating two Private, Module variables to store the IBF Context information and the IBF Smart Tag name. The IBF Context string contains all of the information to initiate the IBF Task Pane. You will notice, when you look at the example Context below, that it contains all the information to display the Customer_View. It contains the Metadata Scope Name, Entity Name, View Name, Reference Schema Name and the actual data elements that are needed to call the IBF Operation. The IBF Smart Tag name, identifies the Smart Tag as an IBF Type, so that it can display the appropriate default menu, "Show Details". (Refer to Listing 8)
  6. The second method we need to create, in order to support the inherited IRecognizer, is the Recognize method. This method is responsible for committing the Smart Tag and displaying the IBF Task Pane. (Refer to Listing 9)

    Let's look at this code a little closer. The parameters that are passed to the Recognize method are as follows:

    • Text – this is the actual text that is passed in from any Smart Tag compliant application, such as Word or Excel.
    • IF_Type – This is the Smart Tag Type, which is really the type of text that will be passed into the Recognizer. Examples are like; Excel Cell, Paragraph, Character, Single Word, Regular Expression.
    • ISmartTagRecognizerSite – This is the Smart Tag Recognizer that will be used to store the Recognizer information when committing the Smart Tag.

    What this code then does is look through the text passed into the recognizer, and searches for one of the CustomerIDs that were loaded during the Initialize routine. Once it finds a match it calls a CommitSmartTag method that will commit the Smart Tag and display it to the user.

  7. To support the Recognize method, I created a CommitSmartTag method that will finish the work of displaying the Smart Tag to the user. (Refer to Listing 10)

    Let's also look at this code, in detail. The input parameters are the same as the Recognize method, so I will not describe those again. What this code does is as follows:

    1. Replaces the {0} in the Context with the appropriate CustomerID. This is necessary so that the proper Customer Details will show up in the IBF Task Pane.
    2. Deserialize the Context Data, into the IContextInformation interface.
    3. Create some custom Smart Tag properties that can be used in Custom Smart Tag Actions.
    4. Commit the Smart Tag, and ultimately display it in the application.
  8. Once again, sign your assembly with your strong name key and increase the Trust Level. You can use the same key as you used when you signed the Windows control library project, IBFNorthwind_ControlLib.
  9. Build the project and make sure that it compiles.

Step 3

Third, we will import the common IBF Metadata, so that our Smart Tag recognizer will be global to all solutions and will be activated in any IBF Smart Tag compliant application.

  1. Within your Visual Studio solution, click on the Import Metadata on the Metadata Explorer toolbar. This will allow you to import pre-existing metadata into your solution.
  2. In order to create an IBF recognizer, we need to use the standard InformationBridge Metadata Scope. If you don't already have this Metadata Scope, we can import it from the same IBF Scope template we used above. You can check to see if you have it, by clicking the Metadata service option from the Import Metadata dialog. You can look through the metadata scopes list and see if the "InformationBridge" scope exists. (Refer to Figure 23) If it is in this list, then import it into your Metadata solution. If you do not see it, then follow the same steps we did earlier, in the "Using the 1.5 Metadata Guidance", step 1. But do not rename this Metadata Scope, leave it as InformationBridge.
  3. After the import you will now see the InformationBridge Metadata Scope in the Metadata Explorer and you will see our NorthwindIBF Metadata Scope. The InformationBridge Metadata Scope is where we will be adding the Recognizer elements to IBF.

Step 4

Let's begin to add the Metadata so that the recognizer will work.

  1. We will begin by creating a pointer to our Smart Tag assembly. So in the Metadata Explorer window, expand the InformationBridge Metadata Scope, and then expand the Ports tree. Find the Port, titled GenericSmartTags and select it. In the Properties window, modify the "Location" property to point to your Smart Tag assembly. In this example, the assembly name is "IBFNorthwind_ST.dll".
  2. Next we will create the element to implement our specific IBF recognizer. In the same Ports tree, click on the GenericRecognizer item. Then in the Properties window, click and edit the "Data" property. This will bring up a dialog where you can modify the XML template to point to your specific assembly type. The only attributes that need to be modified are the Id and TypeName. The Id can be any ID you want, but the TypeName must match your IBF recognizer namespace and class name. Below is the complete XML template, with the proper modifications to support this sample walkthrough. (Text in bold below)
    <msibf:GenericRecognizer 
        Id="Customer_Recognizer" 
        TypeName="IBFNorthwind_ST.IBFNorthwindRecognizer" 
        xmlns:msibf="http://schemas.microsoft.com/InformationBridge/2004">
        <YourInitializationData>
            xmlns="http://schemas.microsoft.com/InformationBridge/2004/Metadata"
        </YourInitializationData>
    </msibf:GenericRecognizer>

    Note: It is important to note that there is a pre-made Operation that already points to the proper GenericSmartTags Port. If you decide to add additional recognizers, then you can copy the GenericRecognizer, Ports and Operations to create a new one. The GenericSmartTags Port, GenericRecognizer Port and the LoadRecognizer Operation are templates and can be reused in any application.

  3. The last step is to create an Action to tell IBF what to do with the Recognizer. Within the InformationBridge Metadata Scope, navigate to the following Action element: Entities --> GenericSmartTags --> Views --> GenericRecognizers --> Actions. Within this element, double click on the [Add Action…] node. This will bring up the Add Action dialog. (Refer to Figure 24) Type CustomerRecognizer as the name. The type should be EnterContext. The Parameters Schema must be MSIBF.GenericRecognizer and you must check the box to enable sequential execution. Click OK to finish adding the Action.
  4. Now we need to hook up the Action to the Operation. To do this, simply double click on the new CustomersRecognizer Action. This will bring up the Action Designer. This is a designer pallet that you can drag and drop operations onto the surface to hook up your action. All we need to do is Load the Recognizer and then Activate the Recognizer. Both of these Operations are already configured and are located under the Operations node. Just drag and drop the LoadRecognizer Operation onto the Action Designer. After the item is dropped onto the designer, the Transformations Selector dialog will pop up. Here we need to select the GenericRecognizer Transformation Instance. This lets IBF know that it will be transforming the data into a Smart Tag Recognizer format. (Refer to Figure 26) Then drag and drop the ActivateRecognizer Operation underneath the LoadRecognizer on the Action Designer. The same transformation dialog will pop up. Select the same GenericRecognizer transformation instance. The completed Action Designer is now complete. (Refer to Figure 25)
  5. Finally, publish the Metadata to the IBF Metadata Service.

Step 5

Now that we have completed the IBF Recognizer Object and the associated Metadata, we can test the Smart Tag.

  1. Close all Open Office applications.
  2. Open up a new Microsoft Word Document.
  3. Type LETSS and then hit Enter.
  4. Hover you mouse over the Smart Tag Recognized text. The LETSS should have a purple dotted line under it. This means that our Smart Tag is working.
  5. Click on the Smart Tag Icon and select "Show Details" from the menu.
  6. The IBF Task pane should show up and process one command. Then the Customer Details should appear. (Refer to Figure 26).

Summary

In this article, I provided you with a brief description of what IBF is and how it should be used. We created a complete walkthrough that took you from start to finish creating an IBF solution. In the next article, I will be showing you how to do some of the more advanced features, such as; Custom Actions, Attached Schemas, Search Capabilities and Client Deployment. As you can see, Information Bridge is a powerful and easy tool to develop with. We did not have to write much code to integrate Office Applications, Web Services, Smart Tags and .NET Windows Components.

References

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

About the Author

Tom McCartan
Web Developer
United States United States
Tom McCartan, Vice President - Digital Infuzion
 
Mr. McCartan has been an industry leader and pioneer of architecting Microsoft’s .NET solutions since early 2000. He is an expert software development specialist and a Microsoft Certified Applications Developer with over ten years of experience in software architecting, developing, implementing and supporting large scale enterprise systems. Tom has led several large scale software development departments for fortune 500 companies such as ACNeilsen, NFO Healthcare, Ajilon and Information Resources. He is an expert on .NET architecture, Web Services, Mobile applications development, BizTalk, SharePoint, and numerous other Microsoft technologies.

Comments and Discussions

 
GeneralSmart Tag also not appearing Pinmembertrossachs8-Jun-06 21:02 
QuestionSmart Tag still not Appearing Pinmembergaurav888822-Feb-06 1:53 
GeneralSystem.StackOverflowException PinmemberPerica Zivkovic16-Oct-05 20:34 
GeneralRe: System.StackOverflowException PinmemberMurlidhar J Chawhan12-Jun-06 23:17 
GeneralSmart Tag not appearing... Pinmemberibftest14-Sep-05 7:05 
GeneralSmart Tag not appearing... PinsussBroken Recognizer15-Aug-05 20:04 
GeneralRe: Smart Tag not appearing... PinmemberIBFLearner16-Aug-05 10:31 
GeneralRe: Smart Tag not appearing... PinsussAnonymous16-Aug-05 10:37 
GeneralRe: Smart Tag not appearing... PinsussAnonymous15-Sep-05 7:33 
GeneralError in Testing your IBF solution PinmemberJames Bonilla2-Aug-05 5:11 
General[Not Working] automatic recognition of the word Pinmembermisabdul@hadeed.com.sa26-Jul-05 9:06 
GeneralRe: [Not Working] automatic recognition of the word PinmemberIBFLearner10-Aug-05 9:29 
GeneralError Msg Pinmembermisabdul@hadeed.com.sa18-Jul-05 10:50 
GeneralRe: Error Msg PinmemberIBFLearner19-Jul-05 3:04 
GeneralThere is an error in the XML document Pinmembermisabdul@hadeed.com.sa22-Jul-05 8:21 
GeneralRe: There is an error in the XML document Pinmemberchriskchung14-Aug-05 8:28 
GeneralRe: There is an error in the XML document Pinmemberchriskchung14-Aug-05 9:39 
GeneralRe: Error Msg Pinsussami11-Aug-05 6:04 
GeneralRe: Error Msg PinmemberDaishi10028-Feb-06 23:30 
GeneralError in the XML document PinmemberIBFLearner18-Jul-05 6:31 
GeneralError when I try to publish metadata PinmemberS@m8426-Jun-05 23:22 
GeneralRe: Error when I try to publish metadata PinmemberIBFLearner9-Aug-05 8:51 
GeneralA doubt about the sample Pinmemberroopaananda16-Jun-05 2:26 
GeneralThe customer smart tag isn't automatically recognized by MS Word Pinmembertrallon9-Jun-05 1:27 
GeneralError in the Region Creation Wizard Pinmembertrallon8-Jun-05 1:28 
GeneralRe: Error in the Region Creation Wizard Pinmembertrallon8-Jun-05 6:24 
GeneralRe: Error in the Region Creation Wizard PinmemberBitschubser24-Jul-05 8:19 
GeneralFurther Errors PinmemberMRiches27-Apr-05 23:54 
GeneralRe: Further Errors PinmemberSanjaDj8-Dec-05 3:51 
GeneralThe state of the failed permission was PinmemberRob8821-Apr-05 13:15 
GeneralRe: The state of the failed permission was PinsussAnonymous26-Apr-05 3:12 
GeneralRe: The state of the failed permission was PinmemberTom McCartan26-Apr-05 3:31 
GeneralRe: The state of the failed permission was PinsussAnonymous27-Apr-05 2:23 
GeneralRunning IBF Server on another box PinmemberNoel Weichbrodt20-Apr-05 10:29 
GeneralTimestamps Pinmemberrumpi17-Apr-05 5:26 
GeneralRe: Timestamps PinmemberTom McCartan19-Apr-05 10:04 
GeneralError in Recognizer class code Pinmemberkapilasw200213-Apr-05 22:55 
GeneralRe: Error in Recognizer class code PinmemberTom McCartan14-Apr-05 5:17 
GeneralRe: Error in Recognizer class code Pinmemberkapilasw200214-Apr-05 14:11 
GeneralRe: Error in Recognizer class code Pinmemberaidriss14-Apr-05 23:46 
GeneralRe: Error in Recognizer class code PinmemberTom McCartan15-Apr-05 3:30 
GeneralRe: Error in Recognizer class code Pinmemberkapilasw200222-Apr-05 18:43 
GeneralRe: Error in Recognizer class code PinmemberBram Poelaert11-May-05 1:54 
GeneralSmart Tag Does Not Work. Pinsusskapila weerasinghe13-Apr-05 17:40 
GeneralRe: Smart Tag Does Not Work. Pinmemberaidriss13-Apr-05 20:22 
GeneralRe: Smart Tag Does Not Work. PinmemberM.T. Hoekstra21-Apr-05 9:41 
GeneralRe: Smart Tag Does Not Work. PinmemberTom McCartan14-Apr-05 5:17 
GeneralRe: Smart Tag Does Not Work. PinmemberCINsyg22-May-05 21:59 
GeneralNew IBF Book Released PinmemberBlueVision12-Apr-05 7:59 
GeneralRe: New IBF Book Released Pinmemberaidriss14-Apr-05 20:40 

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
Web04 | 2.8.140415.2 | Last Updated 2 Apr 2005
Article Copyright 2005 by Tom McCartan
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid