Modify the Integration Orchestration for a New Attachment Field

This procedure shows you how to modify the existing integration to handle your new attachment.

Here's how you modify the integration in Oracle Integration to handle your new attachment.

Note: First, make sure the integration recipe name "OFS B2BSVC Attachment" is active.

Regenerate the Endpoint

Create a new version of the orchestration integration "OFS B2BSVC Activity Updated" and open it for editing.

For more information on creating new versions, see Create a Draft of an Integration in the Using Integrations in Oracle Integration guide.

To get custom fields to appear in the mapper, you must regenerate the endpoint. Do this by clicking on the OFS trigger onActivityEvent and clicking Regenerate.

Click Regenerate in the dialog box.

This regenerates the WSDL and any dependent artifacts. You may see errors and warnings caused by the new WSDL. You need to fix these manually. They're most likely just namespace errors.

Your primary business identifiers may get erased. Add them back using the values in the following table:
Primary Tracking Field Tracking Name Tracking Variable
Primary apptNumber appt Number tracking_var_1
NA eventType event Type tracking_var_2
NA user user tracking_var_3

For more information on regenerating endpoints, see Regenerate a WSDL File for Integrations in the Using Integrations in Oracle Integration guide.

Modify the Integration

You can now add a section to the integration to handle your new attachment.

The screenshot below shows the detail for the new attachment section.
Add Section for New Attachment
  1. Add a switch activity to the end of the orchestration.

    Two branches are automatically created:

    1. Undefined branch:
      1. Click Edit on the routing expression to start the Expression Builder.

        For more information on using the Expression Builder, see the Create Routing Expression Logic in Both Expression Mode and Condition Mode topic in the Using Integrations in Oracle Integration guide.

        Note: Be sure you're in Expression Mode and not Condition Mode.
      2. In the Expression Builder, enter a value for Expression Name. For example, exists <property label>.
      3. Find your new attachment property in the Source area. It should be in the tree under the following:
        → notify_POST
        
                    → events.definitions.activityEvent 
            
                        → activityChanges 
        
                            → <property label>
      4. Drag the new attachment property element from the Source area to the first text box of the new condition.

        It should be the text box with the xpath expression of the element.

      5. Enclose the text with "boolean(<element for your new attachment property>)" to convert it to boolean.
      6. Set the condition operator to the equal sign "=".
      7. In the text box after the operator, enter "true()".
      8. Click Validate to validate the expression.
      9. Click the Done Editingbutton.
        Note: You may need to click the >> overflow icon to expand the menu.

        The expression should be displayed: boolean(<element for your new attachment property>) = true()

      10. Click Close.
    2. Otherwise (second) branch:

      This branch is taken if the routing expression for the initial branch does not resolve to true. Leave it blank.

      The first branch will call a "local integration", that will handle the attachment.

      For more information on local integrations, see Invoke a Co-located Integration from a Parent Integration in the Using Integrations in Oracle Integration guide.

      1. Click Actions to expand the panel.
      2. Drag Integration to the location in the integration canvas where you want to call another integration. (Immediately after the routing expression on the first branch.

        The Configure Local Integration Service wizard is displayed.

      3. Specify the details as shown in the following table.

        Local Integration Details (1)

        Element Description
        What do you want to call your local integration invocation? Specify a name. This can be any name such as handleMyAttachment.
        What does this local integration invocation do? Specify a description.
      4. Click Next.
      5. Specify the details shown in the following table.

        Local Integration Details (2)

        Element Description
        Integration Select the co-located integration. Only active integrations are displayed. In this case, it is OFS B2BSVC Attachment.
        Identifier Displays the identifier of the selected integration.
        Description Displays the description of the selected integration.
      6. Click Next.
      7. Select the operation for the co-located integration. In this case select POST.
      8. Click Next.
      9. Review your selections.
      10. Click Done.
  2. A new map should be created just before the local integration invocation. Give it any descriptive name such as Map to handleMyAttachment.

    For more information about how to use the Oracle Mapper, see Using the Oracle Mapper with Oracle Integration guide.

  3. Edit the map. This map is used to provide inputs to the local integration invocation. The following table shows the detail for sources, target, and instructions.

    Map Details

    Sources Target Instructions
    OnActivityEvent Request-->events.definitions.activityEvent-->activityDetails-->wo_number TemplateParameters→ wo_number Map this by finding and dragging the Source to the Target.
    OnActivityEvent Request-->events.definitions.activityEvent-->activityChanges→<property label> QueryParameters→ attachmentPropertyValue Map this by finding and dragging the Source to the Target.
    Note: If the mapper doesn't let you drag the source element to the target, then create the target node for attachmentPropertyValue and drag the element to the text box at the bottom. Click Save.
    OnActivityEvent Request-->events.definitions.activityEvent-->activityDetails-->activityId QueryParameters→ activityId Map this by finding and dragging the Source to the Target.
    NA QueryParameters→ propertyLabel Set this to the literal string value of your property label. For example, "my_attachment".

    You can do this by creating the target node (right-click the node and click on "Create Target Node") for propertyLabel, entering the text in the expression text box at the bottom, then clicking on the Set Text button followed by Save.

    Note: The value you enter must match the name of the custom attachment property you created in OFS.
    NA QueryParameters→ description Set this to the literal string value of a description that appears in the Work Order attachments UI. For example, "MyAttachment imported from Oracle Field Service."

    Do this by creating the target node for description, entering the text in the expression text box at the bottom, then clicking on Set Text followed by Save .

    NA QueryParameters→ categoryName Set this to the literal string value the attachment's category name. For example, "MY_ATTACHMENT".
    Do this by creating the target node for categoryName, entering the text in the expression text box at the bottom, then clicking on the Set Text button followed by the Save button.
    Note: The value you enter must match the attachment category name of the attachment category you created in Fusion Service.
    NA QueryParameters → ConnectivityProperties Ignore this element.
  4. On the mapper, click Validate.
  5. Click Close.
  6. Save the integration.
  7. Close the integration.
  8. Activate the integration.
  9. Test your new attachment field.