Creating and Updating XML Profiles (Post September, 2013)

Document created by mike_c_frazier Employee on Sep 10, 2013
Version 1Show Document
  • View in full screen mode
Detailed below are the changes made to XML profiles in the September, 2013 release.
XML Profiles in AtomSphere
As of the September 2013 Dell Boomi AtomSphere release, additional functionality has been added to any new XML Profile a developer creates. XML profiles that you create, or XML Schemas (XSD files) that you import, can contain elements that reference complex types and/or element declarations.
A complex type is a type definition for elements that may contain attributes and elements. Complex types are useful because once you define them, other elements with the same characteristics can refer to them through their Type attribute. This allows you to define one complex type and reference its definition multiple times. Complex types more accurately represent the structure of XSD files. An element declaration associates a name with a type definition, which can be a built-in data type, a simple type or a complex type. You can use element declarations to validate element information item values using a type definition, and to specify default or fixed values for element information items.
Expanding a complex type or element declaration creates additional XML profile elements. Top-level, non-recursive complex types and element declarations are expanded when you import an XSD file. You can expand their children as needed.
XML profiles that you create, or XML Schemas (XSD files) that you import, can contain elements that reference complex types and/or element declarations.
  •           A complex type is a type definition for elements that may contain attributes and elements. Complex types are useful because once you define them, other elements with the same characteristics can refer to them through their Type attribute. This allows you to define one complex type and reference its definition multiple times. Complex types more accurately represent the structure of XSD files. Complex types are represented by yellow icons in the tree structure on the XML profile’s Data Elements and Types tabs. This icon 0EM40000000PQMnrepresents a complex type without elements or attributes. This icon 0EM40000000PQMsrepresents a complex type that has elements and/or attributes.
  •           An element declaration associates a name with a type definition, which can be a built-in data type, a simple type or a complex type. You can use element declarations to validate element information item values using a type definition; and to specify default or fixed values for element information items. Element declarations are represented by blue icons in the tree structure on the XML profile’s Data Elements and Types tabs. This icon 0EM40000000PQMxrepresents an element declaration without elements or attributes. This icon 0EM40000000PQN2represents an element declaration that has elements and/or attributes.
Expanding a complex type or element declaration creates additional XML profile elements. You can decide which complex types and element declarations to expand in the XML profile. If your map contains a complex type whose child elements need to be mapped, you would expand that element, for example. Complex types can be non-recursive or recursive. Top-level, non-recursive complex types are expanded when you import the XSD file. You can expand their children as needed. Recursive complex types are not expanded by default.
XML profiles created as of the September 2013 release or later use identifier instances rather than constraints. Identifier instances can be based on occurrence or qualifier. Therefore when you create new XML profiles you see options for adding identifier instances and qualifiers. XML profiles created prior to the September 2013 release continue to use constraints. It is recommended that you use identifier instances rather than constraints in order to improve performance and to use less memory.
If you have a constraint defined on an existing XML profile and then you re-import from an XSD file, the constraint will be deleted when the XML profile is saved. Qualifiers and identifier instances must be used in the updated XML profile.
You can create XML profiles that use or do not use complex types and element declarations. XML profiles created prior to the September 2013 release do not contain complex types or element declarations. You cannot reference complex types or element declarations in those XML profiles, unless you import an XSD file into the profile.
The XML profile's Data Elements tab displays the actual structure of the XML document. Because XML is a hierarchical structure, the elements, attributes and their relationships are represented in a tree structure. Element names in the XML profile need to match the XML document’s element and attribute names exactly. The application uses this configuration to know how to read and write the XML document.
Every XML profile has exactly one root element. All other elements are contained within this single root element. Elements can be nested within another element to establish parent/child relationships.
The icons in the tree structure on the Data Elements tab represent the following:
  •           0EM40000000PQN7An element without elements or attributes
  •           0EM40000000PQNCAn element that has elements and/or attributes
  •           0EM40000000PQNMAn attribute
  •           0EM40000000PQNRAn element that references a complex type without elements or attributes
  •           0EM40000000PQNWAn element that references a complex type that has elements and/or attributes
  •           0EM40000000PQNbAn element that references an element declaration without elements or attributes
  •           0EM40000000PQNgAn element that references an element declaration that has elements and/or attributes
If you select an element in the tree on the left its settings appear on the right.
0EM40000000PQNc
If you select an attribute in the tree on the left its settings appear on the right.
0EM40000000PQNl
Creating a New Complex Types XML Profile
  1.           Create a new XML Profile using the Create Component feature.
0EM40000000PQNq
  1.           Once created, to add Complex Types, select the Types tab near the top of the canvas.
0EM40000000PQNv
  1.           Once selected, you can begin adding in the appropriate Complex Types
0EM40000000PQO00EM40000000PQO5
  1.           From here, we can add any number of Complex Types
0EM40000000PQOA
  1.           Once you have created the appropriate types, you can reference these types by using the Type Name under the data elements tab. Start by selecting the element you want to use as a reference, and selecting the magnifying glass to search the Type Name’s available.
0EM40000000PQOF
  1.           Once selected, your Data Elements canvas will populate with your configured fields.
0EM40000000PQOK
Updating an existing XML Profile
Updating an old XML Profile (one created before September, 2013) requires the user to identify the parent child relationships of each element before changes can be committed. Let’s take a look at how to update certain elements, depending on their relationship.
Updating a “Middle Child” element
A middle child element is an element that has both a parent and child associated with it. To make changes to a “middle child” element, you need to access the element in the types tab through its parent. Middle child elements will show up in the Types tab twice. Once as the parent to its child elements, and once as a child in its parents tree. To make changes to a middle child element, we need to access that element through its parent’s tree.
  1.           Identify the element you wish you modify, in this example, we want to modify SalesOrderLineRet. As you can see in the picture below, options like min/max and looping are grayed out. To make changes to these fields, we will have to access the SalesOrderLineRet element through its parent.
0EM40000000PQOP
  1.           We need to identify the parent element that SalesOrderLineRet is associated with. In this situation, it is SalesOrderRet. Once that we have identified the parent, we can switch to the Types tab and find our middle child, SalesOrderLineRet.
0EM40000000PQNh
  1.           Once we have found our middle child element, SalesOrderLineRet, listed under the parent element SalesOrderRet, we can make the appropriate changes.
0EM40000000PQOU
Updating a Child Element
Updating a child element is a simple process. First, we need to identify the parent element for that particular child element. Once identified, we can switch to the Types tab and find the child element listed under its parent. Let’s take a look.
  1.           Identify the Parent of the Child Element you would like to change. In this example, the child element is TxnLineID, and the parent element is SalesOrderLineRet. Note how, even with TxnLineID selected, we can’t make any changes to it under the Data Elements tab.
0EM40000000PQOZ
2) Now that we have identified the parent to be SalesOrderLineRet, we can switch to the Types tab, find the parent element, expand it, and select the child element. From here, we can make any appropriate changes.
0EM40000000PQOe
1 person found this helpful

Attachments

    Outcomes