Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create an Event Process with two XMLSplitter components and configure these with Split and Group operations.
  2. Connect Feeder and Display components on both XMLSplitter components separately.
  3. Send message using each Feeder and component to demonstrate the difference in output using that appears in the Display components

Anchor
_Toc384199118
_Toc384199118
Components used

...

  1. Add a new Event Process with name 'xmlSplitterXMLSplitter_Example'.
  2. Drag the XMLSplitter component from MOMs category in the Micro Service Palette to the Fiorano Orchestrator.


    Figure 1: Adding XMLSplitter component to Fiorano Orchestrator
     
  3. Click the XMLSplitter component and do any of the following to rename the component from 'XMLSplitter' to 'XMLSplitter_Split':
    1. Press F2, change the name and click OK.


      Figure 2: Renaming using Keyboard action 'F2'
       
    2. Go to Name property under General tab in Properties, change the name and press ENTER.


      Figure 3: Renaming using General Properties
    Note

    Change in name is to distinguish it from the XMPLSplitter component that will be configured for Group operation.

  4. Double-click the XMLSplitter_Split component in the Orchestrator to open Configuration Property Sheet (CPS).


    Figure 4: XMLSplitter CPS
     

  5. In the Interaction Configurations section, select Schema option under Attributes and perform the following actions:
    1. Click the Ellipsis button that appears on the Schema row in Configuration dialog box and paste a valid schema in the Schema editor. Then click the Ellipsis button present in the bottom-right part of the Schema panel to open Root Element dialog box.

      Expand
      titleUse this Schema for the present example.

      <?xml version="1.0" encoding="UTF-8"?>

      <xsd:schema xmlns="http://www.fiorano.com/fesb/activity/Text2XML1"

        xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"

        targetNamespace="http://www.fiorano.com/fesb/activity/Text2XML1">

         <xsd:element name="MovieSchema">

            <xsd:complexType>

               <xsd:sequence>

                  <xsd:element minOccurs="0" maxOccurs="unbounded" name="client">

                     <xsd:complexType>

                        <xsd:sequence>

                           <xsd:element name="customer_name" type="xsd:string"/>

                           <xsd:element name="movie_name" type="xsd:string"/>

                           <xsd:element name="show_timings" type="xsd:string"/>

                           <xsd:element name="clients_email_id" type="xsd:string"/>

                        </xsd:sequence>

                     </xsd:complexType>

                  </xsd:element>

               </xsd:sequence>

            </xsd:complexType>

         </xsd:element>

      </xsd:schema>


      Figure 5: Navigating to Root element after pasting Schema
       

    2. In the Root Element dialog box, select 'MovieSchema' and click OK. The root element will appear within Select Root Element brackets present next to the Ellipsis button. Click OK in Schema editor.


      Figure 6: Selecting Root Element
       
    3. As Schema section lists all the namespace prefixes used by XML schema, leave Namespaces section without any changes.
  6. Click XPath Ellpsis button and perform the following actions in the XPath dialog box:
    1. Select and delete the default Schema present in the editor.
    2. Drag the client part under MovieSchema tree from the left panel to the editor and click OK.


      Figure 7: Selecting XPath for XMLSplitter_Split
       
  7. Retain the Operation value as 'Split' itself, click Next twice and then click Finish.

...

To run the example, perform the following actions in the Orchestrator:

  1. Click Check Resource and ConnectivityConnectivity Image Modified icon (or press ALT+SHIFT+C) to check resource and connectivity.
  2. Click Run Event ProcessProcess Image Modified icon (ALT+SHIFT+R) to run the event process. Four windows: Feeder_Split, Display_Split, Feeder_Group and Display_Group get open.
  3. In both Feeder_Split and Feeder_Group, rename customer_name on all three occurrences as explained below: the
    1. first and second names to 'customer_name_1'
    and the
    1. third to 'customer_name_3'.
    Tip

    Two of the names have to be the same to test grouping; you may use your preferred names different from those used in this example.

  4. In Feeder_Split, click Send.


    Figure 12: Changing customer_name in Feeder_Split and sending the message
     
  5. Three messages appear in Display_Split window.


    Figure 13: Three messages appearing in Display_Split
     
  6. In Feeder_Group, click Send.


    Figure 14: Changing customer_name in Feeder_Group and sending the message
     
  7. In Display_Group, only two messages appear, because the first and second client entries are grouped by the same customer_name, that is, the clients with  "customer_name_1" as customer_name are grouped.


    Figure 15: Data with same the same customer_name clubbed into one message

Anchor
_Toc382505829
_Toc382505829
Reference

Adaptavist ThemeBuilder EngineAtlassian Confluence