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:
<WorkflowName>
<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
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"