Importing event and entity types from an XML schema

If you have an .xsd file that contains your event or entity definitions, you can import it to create the event types and entity types in the business object model (BOM).

Before you begin

Before you import the XML schema, ensure that your file has the correct structure and the required annotations for events and entities. The XSD file must also contain the elementFormDefault="qualified" attribute to ensure that all the elements are qualified with a namespace in the generated XML files.

About this task

If you have an existing XML schema from an external source, for example from WebSphere® Message Broker or IBM® Integration Bus, you can import the event definitions from the schema into the BOM.

If you have not written business model definitions for your entity types, you can create an XML schema to define your entities and use this schema to generate the entity types in the BOM.

Procedure

  1. Right-click the solution project, and click Import.
  2. Expand Insight Designer, select Event and Entity Types from an XML schema, and then click Next.
  3. Select the solution project for which you want to create the events and entities.
  4. Select the .xsd file that contains the definition of your events and entities:
    • If the .xsd file is in your workspace, click Select XSD, select your file, and click OK.
    • If the .xsd file is on your file system, click Select External XSD, select your file, and click OK.

    The schema namespace and the package name are displayed under the XML schema. The default package name is created from the namespace. You can change the package name by selecting the package and clicking Edit Package Name.

  5. In the BOM entry name field, enter a name for the BOM entry.

    By default, the BOM entry takes the name of the .xsd file.

  6. Click Finish.

Results

A BOM entry is created in the bom folder of your BOM project. You can navigate and view the generated event and entity types in the BOM editor.

Important: In the BOM editor, you can modify the verbalization of these generated types. However, you must not use other editing features of the BOM editor on these types. See BOM project and BOM editor.

What to do next

You can create a rule agent and write business rules.