B AutomationMap.xml File

This appendix provides examples of the generated automationMap.xml file for Oracle Communications Order and Service Management (OSM).

Note:

This appendix assumes that you have read "Using Automation."

After you have defined the automated task or automated notification, and defined the automation for it, a successful build of the project automatically generates the automationMap.xml file. The file is placed in the cartridgeName/cartridgeBuild/automation directory, which is only visible from the Java perspective.

This file is a direct result of the automation definition, as shown in the following examples. The field names, and the data defaulted or entered for the field, on the various tabs of the Properties window directly relate the XML elements and attributes, and their data values, defined in the automationMap.xml file.

AutomationMap.xml Examples for Automated Tasks

This section provides various examples of generated automationMap.xml files. The examples include predefined and custom automations defined for automated tasks. In the XML, an automated task is defined by the <taskAutomator> element.

XSLTSender Internal Event Receiver

This example reflects an automated task with an automation defined as XSLTSender, and as an internal event receiver. Specifics of the automation definition include:

  • Automated Task name: MyTask

  • Automation name: MyXSLTSenderIntAutomation

  • XSLT file name: C:\myWorkingDirectory\myXslt.xslt

Example B-1 XSLTSender Internal Event Receiver

<taskAutomator>
  <pluginJndiName>MyTask.MyTask.MyXsltSenderIntAutomation</pluginJndiName>
  <ejbName>MyTask.MyTask.MyXsltSenderIntAutomation</ejbName>
  <className>com.mslv.oms.automation.plugin.XSLTSender</className>
  <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
  <receive xsi:type="am:InternalReceiver">
    <mnemonic>MyTask</mnemonic>
    <executionModes>do</executionModes>
  </receive> 
  <implement xsi:type="am:XsltSender">
    <to>
      <jndiName>MyTask.MyXsltSenderIntAutomation.JNDIName</jndiName>
      <destinationType>javax.jms.Queue</destinationType>
    </to>
    <am:sendNullMessage>true</am:sendNullMessage>
    <am:script>
      <am:file>C:\myWorkingDirectory\myXslt.xslt</am:file>
      <am:cache>
        <am:maxSize>50</am:maxSize>
        <am:timeout>15000</am:timeout>
      </am:cache>
    </am:script>
  </implement>
</taskAutomator>

Notes Common to All Examples

  • <pluginJndiName> and <ejbName> are based on the EJB Name field, located on the Properties view Details tab.

  • <className> is based on the Action field selection, located on the Add Automation window.

  • <runAs> is based on the Run As field, located on the Properties view Details tab.

Notes on Example

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an internal event receiver, the elements are based on information defined on the Properties view Internal Event Receiver tab. (<mnemonic> is based on the task name.)

  • <implement> type is based on the automation plug-in you are implementing. Because this example implements XSLTSender, the <to> and <sendNullMessage> elements are generated. These elements are not present when the implementation is for an automator.

    • The <to> elements are based on information defined on the Properties view Router tab, To sub-tab. This tab is present only when the automation is XSLTSender or XQuerySender.

    • The <script> elements are based on information defined on the Properties view XSLT tab. This tab is present only when the automation is XSLTSender or XSLTAutomator.

XSLTSender External Event Receiver

This example reflects an automated task with an automation defined as XSLTSender, and as an external event receiver. Specifics of the automation definition include:

  • Automated Task name: MyTask

  • Automation name: MyXSLTSenderExtAutomation

  • XSLT file name: C:\myWorkingDirectory\myXslt.xslt

Example B-2 XSLTSender External Event Receiver

<taskAutomator>
  <pluginJndiName>MyTask.MyTask.MyXsltSenderExtAutomation</pluginJndiName>
  <ejbName>MyTask.MyTask.MyXsltSenderExtAutomation</ejbName>
  <className>com.mslv.oms.automation.plugin.XSLTSender</className>
  <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
  <receive xsi:type="am:ExternalReceiver">
    <jmsSource>
      <from>
        <jndiName>MyTask.MyXsltSenderExtAutomation.jndiName</jndiName>
        <destinationType>javax.jms.Queue</destinationType>                                
      </from>                        
    </jmsSource>     
    <correlation xsi:type="MessagePropertyCorrelation">
      <property>JMSCorrelationID</property>
    </correlation>   
  </receive>
  <implement xsi:type="am:XsltSender">
    <to>
      <jndiName>MyTask.MyXsltSenderExtAutomation.JNDIName</jndiName>
      <destinationType>javax.jms.Queue</destinationType>
    </to>
    <am:sendNullMessage>true</am:sendNullMessage>
    <am:script>
      <am:file>C:\myWorkingDirectory\myXslt.xslt</am:file>
      <am:cache>
        <am:maxSize>50</am:maxSize>
        <am:timeout>15000</am:timeout>
      </am:cache>
    </am:script>
  </implement>
</taskAutomator>

Notes on Example

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an external event receiver, the elements are based on information defined on the Properties view External Event Receiver tab.

  • <implement> type is based on the automation plug-in you are implementing. Because this example implements XSLTSender, the <to> and <sendNullMessage> elements are generated. These elements are not present when the implementation is for an automator.

    • The <to> elements are based on information defined on the Properties view Router tab, To sub-tab. This tab is present only when the automation is XSLTSender or XQuerySender.

    • The <script> elements are based on information defined on the Properties view XSLT tab. This tab is present only when the automation is XSLTSender or XSLTAutomator.

XSLTAutomator Internal Event Receiver

This example reflects an automated task with an automation defined as XSLTAutomator, and as an internal event receiver. Specifics of the automation definition include:

  • Automated Task name: MyTask

  • Automation name: MyXSLTAutomatorIntAutomation

  • XSLT file name: C:\myWorkingDirectory\myXslt.xslt

Example B-3 XSLTAutomator Internal Event Receiver

<taskAutomator>
  <pluginJndiName>MyTask.MyTask.MyXsltAutomatorIntAutomation</pluginJndiName>
        <ejbName>MyTask.MyTask.MyXsltAutomatorIntAutomation</ejbName>
  <className>com.mslv.oms.automation.plugin.XSLTReceiver</className>
        <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:InternalReceiver">
                <mnemonic>MyTask</mnemonic>
                <executionModes>do</executionModes>
        </receive>   
        <implement xsi:type="am:XsltAutomator">
                <am:script>
      <am:file>C:\myWorkingDirectory\myXslt.xslt</am:file>
                            <am:cache>
                                      <am:maxSize>50</am:maxSize>
                                      <am:timeout>15000</am:timeout>
                            </am:cache>
                  </am:script>
                  <am:updateOrder>true</am:updateOrder>
        </implement>
</taskAutomator>

Notes on Example

  • <className> is based on the Action field selection, located on the Add Automation window. (XSLTReceiver is the name of the class that represents XSLTAutomator. The name presentation in Oracle Communications Design Studio was intentional to avoid confusion: XSLTAutomator and XSLTSender both receive data, but in addition, XSLTSender can send a message.)

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an internal event receiver, the elements are based on information defined on the Properties view Internal Event Receiver tab. (<mnemonic> is based on the task name.)

  • <implement> type is based on the automation plug-in you are implementing. Because this example implements XSLTAutomator, the <to> and <sendNullMessage> elements are not generated. These elements are present when the implementation is for a sender.

    • The <script> elements are based on information defined on the Properties view XSLT tab. This tab is present only when the automation is XSLTSender or XSLTAutomator.

XSLTAutomator External Event Receiver

This example reflects an automated task with an automation defined as XSLTAutomator, and as an external event receiver. Specifics of the automation definition include:

  • Automated Task name: MyTask

  • Automation name: MyXSLTAutomatorExtAutomation

  • XSLT file name: C:\myWorkingDirectory\MyXslt.xslt

Example B-4 XSLTAutomator External Event Receiver

<taskAutomator>
  <pluginJndiName>MyTask.MyTask.MyXsltAutomatorExtAutomation</pluginJndiName>
          <ejbName>MyTask.MyTask.MyXsltAutomatorExtAutomation</ejbName>
  <className>com.mslv.oms.automation.plugin.XSLTReceiver</className>
          <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
          <receive xsi:type="am:ExternalReceiver">
                    <jmsSource>
                              <from>
                                        <jndiName>MyTask.MyXsltAutomatorExtAutomation.jndiName</jndiName>
                                        <destinationType>javax.jms.Queue</destinationType>                                
                              </from>                        
                    </jmsSource>     
                    <correlation xsi:type="MessagePropertyCorrelation">
                              <property>JMSCorrelationID</property>
                    </correlation>   
          </receive>
          <implement xsi:type="am:XsltAutomator">
                    <am:script>
    <am:file>C:\myWorkingDirectory\myXslt.xslt</am:file>
                          <am:cache>
                                      <am:maxSize>50</am:maxSize>
                                      <am:timeout>15000</am:timeout>
                            </am:cache>
                  </am:script>
                  <am:updateOrder>true</am:updateOrder>
          </implement>                       
</taskAutomator>

Notes on Example

  • <className> is based on the Action field selection, located on the Add Automation window. (XSLTReceiver is the name of the class that represents XSLTAutomator. The name presentation in Design Studio was intentional to avoid confusion: XSLTAutomator and XSLTSender both receive data, but in addition, XSLTSender can send a message.)

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an external event receiver, the elements are based on information defined on the Properties view External Event Receiver tab.

  • <implement> type is based on the automation plug-in you are implementing. Because this example implements XSLTAutomator, the <to> and <sendNullMessage> elements are not generated. These elements are present when the implementation is for a sender.

    • The <script> elements are based on information defined on the Properties view XSLT tab. This tab is present only when the automation is XSLTSender or XSLTAutomator.

Custom Automation Internal Event Receiver

This example reflects an automated task with an automation defined as a custom automation plug-in, and as an internal event receiver. Specifics of the automation definition include:

  • Automated Task name: InfoRequestAT

  • Automation name: MyAutomationOnTheTaskAutomationTab

  • Java class name: InfoRequest

Example B-5 Custom Automation Internal Event Receiver

<taskAutomator>
  <pluginJndiName>
    InfoRequestAT.InfoRequestAT.MyAutomationOnTheTaskAutomationTab
  </pluginJndiName>
          <ejbName>
    InfoRequestAT.InfoRequestAT.MyAutomationOnTheTaskAutomationTab
  </ejbName>
        <className>InfoRequest</className>
        <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:InternalReceiver">
                <mnemonic>InfoRequestAT</mnemonic>
      <executionModes>do</executionModes>
        </receive>
</taskAutomator>

Notes on Example

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an internal event receiver, the elements are based on information defined on the Properties view Internal Event Receiver tab. (<mnemonic> is based on the task name.)

  • Because this is a custom automation, the <implement> element is not generated. You are required to define this element in the XML Template field, located on the Custom Automation Plugin window.

Custom Automation External Event Receiver

This example reflects an automated task with an automation defined as a custom automation plug-in, and as an external event receiver. Specifics of the automation definition include:

  • Automated Task name: InfoResponseAT

  • Automation name: MyAutomationOnTheTaskAutomationTab

  • Java class name: InfoResponse

Example B-6 Custom Automation External Event Receiver

<taskAutomator>
  <pluginJndiName>
    InfoResponseAT.InfoResponseAT.MyAutomationOnTheAutomationTab
  </pluginJndiName>
  <ejbName>
    InfoResponseAT.InfoResponseAT.MyAutomationOnTheAutomationTab
  </ejbName>
        <className>InfoResponse</className>
        <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:ExternalReceiver">
                <jmsSource>
                        <from>
                        <jndiName>
          InfoResponseAT.MyAutomationOnTheAutomationTab.jndiName
        </jndiName>
                                        <destinationType>javax.jms.Queue</destinationType>                                
                              </from>                        
                </jmsSource> 
                <correlation xsi:type="MessagePropertyCorrelation">
                <property>JMSCorrelationID</property>
                </correlation>       
  </receive>
</taskAutomator>

Notes on Example

  • <receive> type is based on the External Event Receiver check box, located on the Add Automation window. Because this example defines an external event receiver, the elements are based on information defined on the Properties view External Event Receiver tab.

  • Because this is a custom automation, the <implement> element is not generated. You are required to define this element in the XML Template field, located on the Custom Automation Plugin window.

AutomationMap.xml Examples for Automated Notifications

This section provides various examples of generated automationMap.xml files. The examples include predefined and custom automations defined for automated notifications. In the XML, an automated notification is defined by the <notificaitonAutomator> element.

Automated notifications can only be defined as internal event receivers so there are no examples of external event receivers in this section. The examples are similar: The main differences are:

  • The value of <ejbName> is based on the Design Studio entity for which the notification is defined. As a result, the value varies because different types of notifications are defined on different Design Studio entities.

  • The value of the <event> type is based on the type of notification. As a result, the value differs based on the type of notification, which in turn dictates the <event> subelements that are generated.

Order Milestone-Based Notification

This example reflects an order milestone-based notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Order name: OsmCartridgeOrder

  • Automation name: MyAutomationOnTheOrderEventsTab

  • Java class name: GenericNotif

Example B-7 Order Milestone-Based

<notificationAutomator>
  <ejbName>
    OsmCartridgeOrder.OsmCartridgeOrder.MyAutomationOnTheOrderEventsTab
  </ejbName>
          <className>GenericNotif</className>
          <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
          <receive xsi:type="am:InternalReceiver">
                    <event xsi:type="OrderNotification">
                              <orderSource>OsmCartridgeOrder</orderSource>
                              <orderType>OsmCartridgeOrder</orderType>
                              <milestone>completion</milestone>
                    </event>
          </receive> 
</notificationAutomator>

Task State-Based Notifications

This example reflects a task state-based notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Automated Task name: InfoRequestAT

  • Automation name: MyAutomationOnTheTaskEventsTab

  • Java class name: GenericNotif

Example B-8 Task State-Based Notification / Task Event Tab

<notificationAutomator>
  <ejbName>
    InfoRequestAT.InfoRequestAT.MyAutomationOnTheTaskEventsTab
  </ejbName>
        <className>GenericNotif</className>
        <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:InternalReceiver">
                <event xsi:type="TaskNotification">
                        <mnemonic>InfoRequestAT</mnemonic>
      <state>completed</state>
                </event>
        </receive>   
</notificationAutomator>

This example reflects another task state-based notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Process name: OsmProcess

  • Rule name: MyProcessTaskStateRule

  • Automation name: MyAutomationOnTheProcessEventsTabForTaskState

  • Java class name: GenericNotif

Example B-9 State-Based Notification / Process Event Tab

<notificationAutomator>
        <ejbName>
    OsmProcess_MyProcessTaskStateRule.OsmProcess.
    MyAutomationOnTheProcessEventsTabForTaskState
  </ejbName>
        <className>GenericNotif</className>
        <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:InternalReceiver">
                <event xsi:type="SystemNotification">
                        <mnemonic>OsmProcess_MyProcessTaskStateRule</mnemonic>
                </event>                     
        </receive>   
</notificationAutomator>

Task Status-Based Notification

This example reflects an task status-based notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Process name: OsmProcess

  • Rule name: MyProcessTaskStatusRule

  • Automation name: MyAutomationOnTheProcessEventsTabForTaskStatus

  • Java class name: GenericNotif

Example B-10 Task Status-Based Notification

<notificationAutomator>
        <ejbName>
    OsmProcess_MyProcessTaskStatusRule.OsmProcess.
    MyAutomationOnTheProcessEventsTabForTaskStatus
  </ejbName>
        <className>GenericNotif</className>
  <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
        <receive xsi:type="am:InternalReceiver">
                <event xsi:type="SystemNotification">
                        <mnemonic>OsmProcess_MyProcessTaskStatusRule</mnemonic>
                </event>                     
        </receive>   
</notificationAutomator>

Order Data Changed Notification

This example reflects an order data changed notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Order name: OsmCartridgeOrder

  • Rule name: MyOrderNotificationRule

  • Automation name: MyAutomationOnTheOrderNotificationTab

  • Java class name: GenericNotif

Example B-11 Order Data Changed Notification

<notificationAutomator>
        <ejbName>
    OsmCartridgeOrder_MyOrderNotificationRule.OsmCartridgeOrder.
    MyAutomationOnTheOrderNotificationTab
  </ejbName>
        <className>GenericNotif</className>
  <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
          <receive xsi:type="am:InternalReceiver">
                    <event xsi:type="SystemNotification">
                              <mnemonic>OsmCartridgeOrder_MyOrderNotificationRule</mnemonic>
                    </event>                 
          </receive> 
</notificationAutomator>

Order Jeopardy Notification

This example reflects an order jeopardy notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Order name: OsmCartridgeOrder

  • Rule name: MyOrderJepRule

  • Automation name: MyAutomationOnTheOrderJepTab

  • Java class name: GenericNotif

Example B-12 Order Jeopardy Notification

<notificationAutomator>
        <ejbName>
   OsmCartridgeOrder_MyOrderJepRule.OsmCartridgeOrder.MyAutomationOnTheOrderJepTab
  </ejbName>
          <className>GenericNotif</className>
          <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
          <receive xsi:type="am:InternalReceiver">
                  <event xsi:type="SystemNotification">
                              <mnemonic>OsmCartridgeOrder_MyOrderJepRule</mnemonic>
                    </event>                 
          </receive> 
</notificationAutomator>

Task Jeopardy Notification

This example reflects a task jeopardy notification with an automation defined as a custom automation plug-in. Specifics of the automation definition include:

  • Automated Task name: InfoRequestAT

  • Rule name: MyTaskJepRule

  • Automation name: MyAutomationOnTheTaskJepTab

  • Java class name: GenericNotif

Example B-13 Task Jeopardy Notification

<notificationAutomator>
  <ejbName>
    InfoRequestAT_MyTaskJepRule.InfoRequestAT.MyAutomationOnTheTaskJepTab
  </ejbName>
          <className>GenericNotif</className>
          <runAs>automation</runAs>
  <cartridgeNamespace>samplecart</cartridgeNamespace>
  <cartridgeVersion>1.0.0</cartridgeVersion>
  <receive xsi:type="am:InternalReceiver">
                    <event xsi:type="SystemNotification">
                              <mnemonic>InfoRequestAT_MyTaskJepRule</mnemonic>
                    </event>                 
        </receive>   
</notificationAutomator>

Generated Entity-Specific XML Files

Design Studio also generates a separate XML file per Design Studio entity that defines an automation. Entity-specific XML files are also placed in the cartridgeName/cartridgeBuild/automation directory within the cartridge, which is only visible from the Java perspective; the directory path and files are not visible from the Studio Design perspective.

The entity-specific XML file names are dependent upon the Design Studio entity name that defines the automation and upon the type of event, resulting in the file name being DesignStudioEntityName_EventType.xml. For a task event, EventType is represented as "automation" in the file name, and for a notification event, EventType is represented as "notification_automation" in the file name.

For example, a Design Studio entity named MyAutomatedTask that defines a task event generates a file named MyAutomatedTask_automation.xml. Similarly, a Design Studio entity named MyOrder that defines an order notification event generates a file named MyOrder_notification_automation.xml.

If multiple task events are defined per Design Studio entity, one XML file that defines all the task events defined for the entity is generated. If multiple notification events are defined per Design Studio entity, one XML file that defines all the notification events defined for the entity is generated.

The automationMap.xml file is a cumulative collection of the contents of these entity-specific XML files, which can be helpful if you should need to determine which mapping is which.