Oracle Migration Tool On Demand Guide > Migrating Workflow Rules and Action Sets > Migrating Workflow Action Sets >

Updating or Inserting Workflow Actions (InsertOrUpdate)


This topic describes how to use the InsertOrUpdate command to update workflow actions (if they exist) and insert workflow actions (if they do not exist) on your Oracle CRM On Demand environment; that is, a customer test environment or production environment. For the purposes of the Oracle Migration Tool On Demand client, this is known as an InsertOrUpdate operation. Unlike the Upsert operation, the InsertOrUpdate operation does not delete any existing workflow actions that are not included in the input XML file.

The InsertOrUpdate command updates workflow actions based on the following user keys:

  1. <WorkflowName>
  2. <Order>

If you want to update an existing action on a workflow rule, then all of the following conditions must be met:

  • The workflow rule named in the input XML file must exist.
  • The value in the <Order> element of the workflow action in the input XML file must match the order number of the existing action within the workflow rule in the Oracle CRM On Demand application.
  • The action type of the workflow action in the input XML file must be the same as the action type of the existing workflow action in the Oracle CRM On Demand application.

    NOTE:  You cannot use an InsertOrUpdate operation to change the action type of an existing workflow action.

About the InsertOrUpdate Operation

When you run the InsertOrUpdate command, the following happens:

  • If Oracle CRM On Demand locates a matching workflow action based on the user keys, then the workflow action is updated.
  • If Oracle CRM On Demand locates the workflow rule based on the <WorkflowName> user key, but cannot locate a matching workflow action based on the <Order> user key, then a new workflow action is created on the specified workflow rule. The next unused order number for actions on the workflow rule is assigned to the new action. For example, if there are already two actions on the workflow rule, then the new action is assigned order number 3.
  • If Oracle CRM On Demand locates the workflow rule based on the <WorkflowName> user key, and locates a matching workflow action based on the <Order> user key, but the action type of the action in the input XML file is different from the action type of the corresponding action in Oracle CRM On Demand, then the action is not updated.
  • Existing workflow actions that are not included in the XML request are not affected. The InsertOrUpdate operation does not delete any existing workflow actions that are not included in the input XML file.
  • The changes following the InsertOrUpdate operation are applied completely or not at all.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to update workflow actions (if they exist) and to insert workflow actions (if they do not exist):

migrationtool -u UserID -s ServerURL InsertOrUpdate WorkflowActionSet WorkflowActionSetXML

where:

  • UserID is the user sign-in ID that has the appropriate privileges to run the Oracle Migration Tool On Demand client commands.
  • ServerURL is the URL for the Oracle CRM On Demand server where your company resides.
  • WorkflowActionSetXML is the fully qualified path name of the workflow action set XML file, for example:

    C:\My Files\My WorkflowActionSet.xml

NOTE:  The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (by using the pipe command) to the client program from standard input; that is, from a file, from the command line, or from another program.

Example of Updating or Inserting Workflow Actions

The following is an example of updating workflow actions (if they exist) or inserting workflow actions (if they do not exist) in your Oracle CRM On Demand server:

migrationtool -u UserID -s ServerURL InsertOrUpdate WorkflowActionSet "C:\My Files\My WorkflowActionSet.xml"

NOTE:  Quotation marks are required only if the path or file name contains spaces.

Oracle Migration Tool On Demand Guide, Release 33 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.