23Migrating Workflow Rules, Action Sets, and User Sets

Workflow Rules

A workflow rule is an instruction to Oracle CRM On Demand to perform one or more actions automatically, each time a specified event occurs. The following table describes the Oracle Migration Tool On Demand client commands that are used with workflow rules. The commands are case sensitive. For examples of running these commands, see Migrating Workflow Rules.

Table Oracle Migration Tool On Demand Commands for Workflow Rules

Command Description

Read WorkflowRuleSet RecordType TriggerEvent [ParentRecordType] [WorkflowName]

This command exports a set of workflow rules or a single workflow rule from an Oracle CRM On Demand server. At a minimum, you must specify a record type and a trigger event, or else specify a workflow rule name together with empty values for the record type, trigger event, and parent record type parameters. An empty value is specified as a set of double quotation marks (""). The parameters are as follows:

  • RecordType is the system name of the record type for the set of workflow rules. If you specify a workflow rule name in the command, then you do not need to specify a record type, but you must include an empty value for the RecordType parameter.

  • TriggerEvent is the code for the trigger event, see the table in Language-Independent Codes for Trigger Events. If you specify a record type, then you must specify a trigger event. If you specify a workflow rule name, then you do not need to specify a trigger event, but you must include an empty value for the TriggerEvent parameter.

  • ParentRecordType is the system name of the parent record type for the workflow rules. This parameter is applicable only if the workflow rule has a parent record and the trigger event is Associate or Dissociate. If you specify a workflow rule name in the command, and if you do not want to specify a parent record type, then you must include an empty value for the ParentRecordType parameter.

  • WorkflowName is the name of the workflow rule. You can read an individual workflow rule by specifying a value for the WorkflowName parameter.

ReadAll WorkflowRuleSet

This command exports all workflow rules from an Oracle CRM On Demand server.

Upsert WorkflowRuleSet WorkflowRulesXML

This command updates or inserts a set of workflow rules on an Oracle CRM On Demand server.

Note: When you use the Upsert command, you must include all of the definition for the workflow rule set in the XML file. Otherwise, some content might be unintentionally removed when you run the Upsert command, because the Upsert command deletes any existing workflow rules for which it does not find a match in the input XML file. For example, if the existing rule sets for a trigger event are not included in the XML file used for the Upsert command, then these rule sets are deleted. For more information about considerations that apply to the Upsert command, see Considerations That Apply to Upsert Operations.

Delete WorkflowRuleSet RecordType TriggerEvent [ParentRecordType] [WorkflowName]

This command deletes the specified workflow rules from an Oracle CRM On Demand server. At a minimum, you must specify a record type and a trigger event, or else specify a workflow rule name together with empty values for the record type, trigger event, and parent record type parameters. An empty value is specified as a set of double quotation marks (""). The parameters are as follows:

  • RecordType is the system name of the record type for the set of workflow rules. If you specify a workflow rule name in the command, then you do not need to specify a record type, but you must include an empty value for the RecordType parameter.

  • TriggerEvent is the code for the trigger event, see the following table. If you specify a record type, then you must specify a trigger event. If you specify a workflow rule name in the command, then you do not need to specify a trigger event, but you must include an empty value for the TriggerEvent parameter.

  • ParentRecordType is the system name of the parent record type for the workflow. This parameter is applicable only if the workflow has a parent record and the trigger event is Associate or Dissociate. If you specify a workflow rule name in the command, and if you do not want to specify a parent record type, then you must include an empty value for the ParentRecordType parameter.

  • WorkflowName is the name of the workflow rule. This parameter is optional. You can delete an individual workflow rule by specifying a value for the WorkflowName parameter.

InsertOrUpdate WorkflowRuleSet WorkflowRulesXML

This command updates a workflow rule if there is a matching workflow rule. If there is not a matching workflow rule, then the command inserts a new workflow rule.

Note: Unlike the Upsert command, the InsertOrUpdate command does not delete any existing workflow rule for which it does not find a match in the input XML file.

The output from the extraction is saved to the TriggerEvent.xml file as follows:

  • If the ParentRecordType parameter has an empty value, then the output is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType
    
  • If the ParentRecordType parameter does not have an empty value, then the output is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType/ParentRecordType
    

The directory structure is automatically created. The structure is based on the unique combination of the record type, and parent record type, if applicable, and the trigger event. The exported XML files do not contain any workflow rule set that is based on a different record type or trigger event.

Considerations That Apply to Upsert Operations

When you run the Upsert command for workflow rules, the existing workflow rules are updated, new workflow rules are inserted, and rules that are not in the request are deleted. For the purposes of the Oracle Migration Tool On Demand client, this is known as an Upsert operation.

The following considerations apply to Upsert operations for workflow rules:

  • The workflow rules are ordered as they appear in the input XML file.

  • You cannot upsert two workflow rules with the same order number.

  • If the workflow rule name does not match an existing workflow rule name, then a new workflow rule is created.

  • If the workflow rule name matches an existing workflow rule name, then the record type and trigger event cannot be modified.

  • The migration service protects data from becoming corrupted if the workflow rule is edited during loading, or loaded twice simultaneously, or extracted while it is being loaded.

  • The input file must contain only the workflow rules that are based on a unique combination of a record type and trigger event. For example, the input file can contain one or many workflow rules based on the Account record type and the When New Record Saved trigger event. The input file cannot contain another workflow rule with a different record type or trigger event.

  • The user running the Upsert command must have access to the object so that the Upsert command completes successfully.

About Inserting, Updating, and Deleting Scheduled Events

A scheduled event is a workflow rule that is automatically executed when a specified date and time is reached. For more information about scheduled events, see Oracle CRM On Demand Online Help.

When you insert a new scheduled event record in a target environment, Oracle CRM On Demand generates a pending instance for the first scheduled occurrence of the event, if the scheduled event is active (that is, the <Active> element on the scheduled event record is set to true). If the scheduled event is not active, then a pending instance is not generated.

When you update a scheduled event record in a target environment, the following happens:

  • Oracle CRM On Demand deletes any pending instance of the scheduled event in the target environment.

  • If the scheduled event is active, then Oracle CRM On Demand generates a new pending instance for the next scheduled occurrence of the event.

When you delete a scheduled event record in a target environment, Oracle CRM On Demand deletes any pending instance of the scheduled event in the target environment.

Language-Independent Codes for Trigger Events

The following table maps the workflow trigger events to the trigger event language-independent code (LIC).

Table Workflow Trigger Events

Trigger Event Trigger Event Language-Independent Code

When New Record Saved

WriteRecordNew

When Modified Record Saved

WriteRecordUpdated

Before Modified Record Saved

PreWriteRecord

Before Record Is Deleted

PreDeleteRecord

After Association With Parent

Associate

After Dissociation From Parent

Dissociate

When Record Is Restored

RestoreRecord

When Records Are Merged

MergeRecords

Scheduled Event

ScheduledEvent

Workflow Action Sets

A workflow action set is an ordered series of workflow actions of different types. The complete set of workflow actions is: CreateTask, Wait, SendEmail, CreateIntegrationEvent, FieldUpdate, AssignBook, SyncOwnerPartner, SyncBookPartner, SyncPartnerBooks, SubmitCall, and SubmitTransaction.

The SyncOwnerPartner, SyncBookPartner, and SyncPartnerBooks workflow actions are available only in Oracle CRM On Demand for Partner Relationship Management. For more information about these actions and how you can use them, see Oracle CRM On Demand for Partner Relationship Management Configuration Guide, available from the Oracle CRM On Demand documentation library.

For more information about workflow actions, see Oracle CRM On Demand Online Help.

The following table describes the Oracle Migration Tool On Demand client commands that are used with workflow actions and workflow action sets. The commands are case sensitive. For examples of running these commands, see Migrating Workflow Action Sets.

Table Oracle Migration Tool On Demand Commands for Workflow Action Sets

Command Description

Read WorkflowActionSet WorkflowRuleName [WorkflowActionName] [ActiveFlag]

This command exports a set of workflow actions or a single workflow action for a specified workflow rule from an Oracle CRM On Demand server. The parameters are as follows:

  • WorkflowRuleName is the name of the workflow rule.

  • WorkflowActionName is the name of a workflow action on the specified rule. This is an optional parameter. However, if you do not want to specify a workflow action name, and if you want to use the ActiveFlag argument to filter the workflow actions that are exported, then you must specify an empty value for the WorkflowActionName parameter. An empty value is specified as a set of double quotation marks ("").

  • ActiveFlag is an optional argument that you can use to filter the workflow actions that are exported, based on the value of the Active check box on the workflow actions. The valid values are true (the Active check box is selected) and false (the Active check box is not selected).

ReadForRuleSet WorkflowActionSet RecordType TriggerEvent

This command exports all the actions for each workflow rule that is based on the specified record type and trigger event from an Oracle CRM On Demand server.

Upsert WorkflowActionSet WorkflowActionSetXML

This command updates or inserts a workflow action set on an Oracle CRM On Demand server.

Note: When you use the Upsert command, you must include all of the definition for the workflow action set in the XML file. Otherwise, some content might be unintentionally removed when you run the Upsert command, because the Upsert command deletes any existing workflow actions for which it does not find a match in the input XML file. For example, if the existing actions for a trigger event are not part of the XML file used for the Upsert command, then these actions are deleted.

InsertOrUpdate WorkflowActionSet WorkflowActionSetXML

This command updates a workflow action set if there is a matching workflow action set. If there is not a matching workflow action set, then the command inserts a new workflow action set.

Note: Unlike the Upsert command, the InsertOrUpdate command does not delete any existing workflow action for which it does not find a match in the input XML file.

Workflow User Sets

A workflow user set is a list of users on whose behalf the workflow actions of a scheduled event for the Analytics record type will be executed. This corresponds to the Execute As related information section in the Workflow Rule Detail page in the UI.

For more information about creating scheduled events for Analytics, see Oracle CRM On Demand Online Help.

The following table describes the Oracle Migration Tool On Demand client commands that are used with workflow user sets. The commands are case sensitive. For examples of running these commands, see Migrating Workflow User Sets.

Table Oracle Migration Tool On Demand Commands for Workflow User Sets

Command Description

ReadForRuleSet WorkflowUserSet RecordType TriggerEvent [ParentRecordType]

This command exports all the user sets for each workflow rule that is based on the Analytics record type and trigger event of ScheduledEvent from an Oracle CRM On Demand server.

  • RecordType is always Analytics

  • TriggerEvent is always ScheduledEvent.

InsertOrUpdate WorkflowUserSet WorkflowUsersXML

This command inserts a new workflow user set.

Delete WorkflowUserSet WorkflowName UserId UserLoginName

This command deletes a user from a workflow user set for a specified workflow rule.

Privileges Required for Migrating Workflow Rules and Action Sets

The following privileges are required for the user account running the Oracle Migration Tool On Demand client commands:

  • For the Read and ReadAll commands: Enable Web Services Access.

  • For the Upsert and InsertOrUpdate commands: Manage Data Rules - Manage Workflow Rules, Manage Data Rules - Manage Workflow Rules for Users (for workflow rules and actions for the User record type only), and Workflow Cancel Save (if applicable). The Workflow Cancel Save privilege is required if the Cancel Save setting is to be updated or inserted.

    The Workflow Cancel Save privilege is required if the trigger event for the workflow rule is Before Modified Record Saved and the Cancel Save option is available for the record type. The Workflow Cancel Save privilege is not required for the Opportunity record type because the Cancel Save option is available with the Manage Data Rules - Manage Workflow Rules privilege.

For information about setting and checking privileges, see Oracle CRM On Demand Online Help.

Privileges Required for Migrating Workflow User Sets

The following privileges are required for the user account running the Oracle Migration Tool On Demand client commands:

  • For the ReadForRuleSet command: Enable Web Services Access.

  • For the InsertOrUpdate and Delete commands: Manage Data Rules - Manage Workflow Rules.

For information about setting and checking privileges, see Oracle CRM On Demand Online Help.

Elements and Sections in the Workflow Rules Output File

The following table describes the elements and sections in the workflow rules XML file.

Note: Certain elements are applicable only for workflow rules that have the Scheduled Event trigger event. These elements are described in the second table in this topic.

Table Elements and Sections in the Workflow Rules XML File

Description Element or Section

<TriggerEvent> specifies the trigger event code that triggers the workflow.

<data:TriggerEvent>WriteRecordNew
</data:TriggerEvent> 

(Optional.) <ParentRecordType> specifies the system name of the parent record type. It is specified if the trigger event is Associate or Dissociate. See Oracle CRM On Demand Online Help or the Workflow UI for the valid combination of RecordType, TriggerEvent, and ParentRecordType.

<data:ParentRecordType>
</data:ParentRecordType> 

The <WorkflowRule> section contains the elements for one workflow rule.

<data:WorkflowRule>
. . .
</data:WorkflowRule>

<WorkflowName> specifies the name of the workflow rule. This field has a maximum of 50 characters.

<data:WorkflowRule>
. . .
  <data:WorkflowName>Opportunity Rule
  </data:WorkflowName> 
. . .
/data:WorkflowRule> 

<Active> specifies whether the rule is active (true) or inactive (false).

<data:WorkflowRule>
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowRule> 

<Exit> specifies whether Oracle CRM On Demand exits the sequence of workflow rules after this rule is executed (true), or does not exit the sequence of workflow rules after this rule is executed (false).

Note: For workflow rules that have the Scheduled Event trigger event, the <Exit> element is always set to true and is read-only.
<data:WorkflowRule>
. . .
  <data:Exit>false</data:Exit> 
. . .
</data:WorkflowRule> 

<WorkflowRuleCondition> is a valid expression, as defined in the Oracle CRM On Demand Online Help, that defines a rule for performing workflow actions. This field has a maximum of 2048 characters. In this example, the condition specifies that the actions are performed if the Probability % field on the new opportunity is set to 90 or higher.

Note: You cannot specify a condition for a workflow rule that has the Scheduled Event trigger event. If the <WorkflowRuleCondition> element is populated when you insert or update a workflow rule that has the Scheduled Event trigger event, then the element is ignored.
<data:WorkflowRule>
. . .
  <data:WorkflowRuleCondition>[{Primary 
    Revenue Win Probability}]>=LookupValue
   ("PROB", "90")
  </data:WorkflowRuleCondition> 
. . .
</data:WorkflowRule> 

<CancelSave> is applicable only for workflow rules that have the Before Modified Record Saved trigger event. It specifies whether the Cancel Save processing is performed (true) if the condition on the workflow rule is not met, or is not performed (false). The Workflow Cancel Save privilege is required to insert or update a workflow rule set that contains the <CancelSave> element.

<data:WorkflowRule>
. . .
  <data:CancelSave>false</data:CancelSave>
. . .
</data:WorkflowRule> 

<Order> is the order number for the workflow rule. It determines the order in which Oracle CRM On Demand invokes a sequence of workflow rules that are based on the same record type and the same trigger event, and if applicable, on the same parent record type.

Note: The <Order> element is read-only for workflow rules that have the Scheduled Event trigger event. Workflow rules that have the Scheduled Event trigger event are not performed as part of a sequence.
<data:WorkflowRule>
. . .
  <data:Order>1</data:Order>
. . .
</data:WorkflowRule>

<DisplayMessage> is applicable only for workflow rules that have the Before Modified Record Saved trigger event. It specifies the message that is returned to the user or Web service if the condition on the rule is not met, and <CancelSave> is set to true for the rule. This field has a maximum of 1999 characters.

<data:WorkflowRule>
. . .
  <data:DisplayMessage></data:DisplayMessage>
. . .
</data:WorkflowRule>

<Description> contains additional information about the workflow rule.

<data:WorkflowRule>
. . .
  <data:Description>Workflow Rule for new 
   opportunities with probability at 90%
   or higher</data:Description>
</data:WorkflowRule>

The <ListOfWorkflowTranslations> section is applicable only for workflow rules that have the Before Modified Record Saved trigger event. It contains the translation values for the workflow Cancel Save message.

<data:ListOfWorkflowTranslations>
. . .
</data:ListOfWorkflowTranslations>

The <WorkflowTranslation> section is applicable only for workflow rules that have the Before Modified Record Saved trigger event. It contains the translation values of the workflow Cancel Save message for one language:

<data:ListOfWorkflowTranslations>
  <data:WorkflowTranslation>
    <data:LanguageCode>ENU
    </data:LanguageCode>
    <data:DisplayMessageTranslation>This 
     Record can not be updated, since 
     workflow Cancel Save (Acc_WF_2 ) is
     in Active status.
    </data:DisplayMessageTranslation>
  </data:WorkflowTranslation>
  <data:WorkflowTranslation>
    <data:LanguageCode>ENG
    </data:LanguageCode>
    <data:DisplayMessageTranslation>This 
     Record can not be updated.
    </data:DisplayMessageTranslation>
  </data:WorkflowTranslation>
. . .
</data:ListOfWorkflowTranslations>

The following table describes the elements that are applicable only for workflow rules that have the Scheduled Event trigger event.

Table Additional Elements for Scheduled Events

Description Element or Section

<StartDateTime> specifies the date and time when the first instance of the scheduled event is to be executed.

Note: If the scheduled event already exists and is active in the target environment, then <StartDateTime> is read-only.
<data:WorkflowRule>
. . .
  <data:StartDateTime>05/10/2018 12:00:00
  </data:StartDateTime>
. . .
</data:WorkflowRule>

<EndDateTime> specifies the date and time after which no further instances of the scheduled event are to be executed.

If the <NumOccurrence> and <EndDateTime> elements both contain a value when you update or insert a scheduled event, then only the value in the <EndDateTime> element is written to the scheduled event.

Note: If the scheduled event already exists and is active in the target environment, then <EndDateTime> is read-only.
<data:WorkflowRule>
. . .
  <data:EndDateTime>07/10/2018 12:00:00
  </data:EndDateTime>
. . .
</data:WorkflowRule>

<RecurrenceType> corresponds to the Recurring field in the UI. It specifies the interval at which the scheduled event is to repeat. Valid values are Hourly, Daily, Weekly, Monthly, and Yearly.

Note: If the scheduled event already exists and is active in the target environment, then <RecurrenceType> is read-only.
<data:WorkflowRule>
. . .
  <data:RecurrenceType>Monthly
  </data:RecurrenceType>
. . .
</data:WorkflowRule>

<RecurrencePeriod> corresponds to the Every field in the UI. It specifies the interval period for the recurring instances of the scheduled event. Only positive integers are valid and the minimum allowed value is 1.

Note: If the scheduled event already exists and is active in the target environment, then <RecurrencePeriod> is read-only.
<data:WorkflowRule>
. . .
  <data:RecurrencePeriod>1
  </data:RecurrencePeriod>
. . .
</data:WorkflowRule>

If the <RecurrenceType> element is set to Monthly, then the <LastDayOfMonth> element specifies whether each instance of the scheduled event is to be executed on the last day of any month in which it is executed (true), or on the day of the month specified in the <StartDateTime> element (false).

The <LastDayOfMonth> element is not applicable if the <RecurrenceType> element is set to anything other than Monthly.

Note: If the scheduled event already exists and is active in the target environment, then <LastDayOfMonth> is read-only.
<data:WorkflowRule>
. . .
  <data:LastDayOfMonth>true
  </data:LastDayOfMonth>
. . .
</data:WorkflowRule>

<NumOccurrence> corresponds to the After field in the UI. It specifies the number of times that the scheduled event is to be executed.

The <EndDateTime> element takes precedence over the <NumOccurrence> element. If both of these elements contain a value when you update or insert a scheduled event, then only the value in the <EndDateTime> element is written to the scheduled event.

Note: If the scheduled event already exists and is active in the target environment, then <NumOccurrence> is read-only.
<data:WorkflowRule>
. . .
  <data:NumOccurrence/>  
. . .
</data:WorkflowRule>

<ListName> specifies the filtered list that returns the records on which the workflow actions act.

If the user who activated the scheduled event has access to more than one list with the same name as the list specified on the scheduled event, then the most personalized list with that name is used. For example, if the user has a private list with a given name and also has access to a role-specific list with the same name, then the private list is used when the instance of the scheduled event is executed.

Note: If the scheduled event already exists and is active in the target environment, then <ListName> is read-only.
<data:WorkflowRule>
. . .
  <data:ListName>All Top Accounts
  </data:ListName>
. . .
</data:WorkflowRule>

<ScheduledInstancesInitiatedByUser> corresponds to the Initiated By field in the UI. This element is read-only.

Note: Up to the time that a scheduled event is made active, the Initiated By field on the scheduled event record shows the name of the user who created the scheduled event. After the event is made active, the Initiated By field is updated to show the name of the user who made the event active.
<data:WorkflowRule>
. . .
  <data:ScheduledInstancesInitiatedByUser>
   1QA2-HQOHK
  </data:ScheduledInstancesInitiatedByUser>
. . .
</data:WorkflowRule>

<ScheduledEventStatus> specifies the current status of the scheduled event. This element is read-only. The valid values are:

  • Not Scheduled. The scheduled event is not active and there is no pending instance of the event.

  • Scheduled. The scheduled event is active and a pending instance of the event exists.

  • Completed. All of the scheduled occurrences of the scheduled event have completed.

  • Terminated. The most recently generated instance of the scheduled event was deleted from the Workflow Wait Monitor, or the scheduled event has been deactivated.

<data:WorkflowRule>
. . .
  <data:ScheduledEventStatus/>
. . .
</data:WorkflowRule>

<EnableNotification> specifies whether Oracle CRM On Demand is to send an email notification to the user who activated the scheduled event when any of the following happens:

  • An instance of the scheduled event completes successfully.

  • An instance of the scheduled event fails.

  • An instance of the scheduled event is deleted from the Workflow Wait Monitor.

If this element is set to true, then an email notification is sent. If this element is set to false, then an email notification is not sent.

<data:WorkflowRule>
. . .
  <data:EnableNotification>false
  </data:EnableNotification> 
. . .
</data:WorkflowRule>

Assign a Book Workflow Action Set

The following table describes the elements and sections in the Assign a Book workflow action set XML output file.

Table Elements and Sections in the Assign a Book Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Rule
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction>
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction>
  <data:Name>BookAssignTest</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction>
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction>
. . .
  <data:Order>1</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowAssignBookAction> section contains the details of the Assign a Book workflow action.

<data:WorkflowAction>
. . .
  <data:WorkflowAssignBookAction>
. . .
  </data:WorkflowAssignBookAction>
</data:WorkflowAction>

If the <AssignmentOption> element value is anything other than Remove all, then either the <BookName> element or the <BookExpr> element is required, to specify the target book. The target book is the book that is to be assigned to records, or removed from records, by the workflow action. The target book is specified as follows:

  • <BookName> optionally specifies the name of the target book.

  • <BookExpr> optionally contains an expression that evaluates to the name of a book.

Note: If the <BookName> and <BookExpr> elements both contain a value in an input file for an Upsert or InsertOrUpdate command, then only the value of the <BookName> element is saved in Oracle CRM On Demand.
<data:WorkflowAction> 
 . . .
  <data:WorkflowAssignBookAction>
    <data:BookName>MyBook</data:BookName>
    <data:BookExpr/>
. . .
  </data:WorkflowAssignBookAction>
</data:WorkflowAction>

<AssignmentOption> specifies the type of book assignment. The valid values are as follows:

  • Add. This option assigns the target book to all records.

  • Replace. This option assigns the target book to all records and removes any previously assigned books that have the same type as the target book.

  • Replace All. This option assigns the target book to all records and removes all previously assigned books, regardless of type.

  • Replace Only. This option specifies that a currently assigned book is to be replaced by the target book. If the <AssignmentOption> element value is Replace Only, then the <ReplaceBookName> element or the <ReplaceBookExpr> element specifies the book that is to be replaced.

  • Remove. This option removes the existing assignment to the target book from all records.

  • Remove All. This option removes all assigned books from the records.

<data:WorkflowAction>
. . .
  <data:WorkflowAssignBookAction>
. . .
    <data:AssignmentOption>Replace Only
    </data:AssignmentOption>
. . .
  </data:WorkflowAssignBookAction>
</data:WorkflowAction>

If the <AssignmentOption> element value is Replace Only, then either the <ReplaceBookName> element or the <ReplaceBookExpr> element is required, to specify the book that is to be replaced. The elements are as follows:

  • <ReplaceBookName> optionally contains the name of the book that is to be replaced.

  • <ReplaceBookExpr> optionally contains an expression that evaluates to the name of the book that is to be replaced.

Note: If the <ReplaceBookName> and <ReplaceBookExpr> elements both contain a value in an input file for an Upsert or InsertOrUpdate command, then only the value of the <ReplaceBookName> element is saved in Oracle CRM On Demand.
<data:WorkflowAction>
. . .
  <data:WorkflowAssignBookAction>
. . .
    <data:ReplaceBookName>NewBook
    </data:ReplaceBookName>
    <data:ReplaceBookExpr/>
. . .
  </data:WorkflowAssignBookAction>
</data:WorkflowAction>

<ApplyTo> specifies the cases in which the new book assignment will be made. The <ApplyTo> element is required if the <AssignmentOption> element value is anything other than Add. The valid values are as follows:

  • Manual. The book assignment will be made only in cases where the previous book assignment was made manually.

  • Auto. The book assignment will be made only in cases where the previous book assignment was made through workflow or a batch assignment.

  • Both. The new book assignment will be made in all cases.

<data:WorkflowAction>
. . .
  <data:WorkflowAssignBookAction>
. . .
    <data:ApplyTo>Both</data:ApplyTo>
  </data:WorkflowAssignBookAction>
</data:WorkflowAction>

Send Email Workflow Action Set

The following table describes the elements and sections in the Send Email workflow action set XML output file.

Table Elements and Sections in the Send Email Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Approval
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction> 
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction> 
  <data:Name>SendEmailTest</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction> 
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction> 
 . . .
  <data:Order>2</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowSendEmailAction> section contains the details of the Send Email workflow action.

<data:WorkflowAction> 
 . . .
  <data:WorkflowSendEmailAction>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<FromType> corresponds to the From field in the user interface (UI). It indicates the source of the From email address. The valid values are:

  • FROM_EMAIL_ADDRESS. This value corresponds to the Current User option in the UI.

  • FROM_DEFAULT. This value corresponds to the Default Email Address option in the UI.

  • SPECIFIC_EMAIL_ADDRESS. This value corresponds to the Specific Email Address option in the UI.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:FromType>FROM_EMAIL_ADDRESS
    </data:FromType>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<From> contains the From email address when <FromType> is set to SPECIFIC_EMAIL_ADDRESS.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:From></data:From>
. . .
  </data:WorkflowSendEmailAction>
. . .
</data:WorkflowAction>

<ReplyToType> corresponds to the Reply To field in the user interface (UI). It indicates the source of the email address that automatically appears in the To field when an email recipient replies to the email. The valid values are:

  • CURRENT_USER_ADDRESS. This value corresponds to the Current User option in the UI.

  • SPECIFIC_EMAIL_ADDRESS. This value corresponds to the Specific Email Address option in the UI.

If this field is left empty, then the From address in the email appears in the To field in the email response.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ReplyToType>CURRENT_USER_ADDRESS
    </data:ReplyToType>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<ReplyTo> contains the email reply address when <ReplyToType> is set to SPECIFIC_EMAIL_ADDRESS.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ReplyTo></data:ReplyTo>
. . .
  </data:WorkflowSendEmailAction>
. . .
</data:WorkflowAction>

<ToType> corresponds to the To field in the UI. It indicates the type of the To email address. The valid values are:

  • R. Corresponds to the Relative User on Record option in the UI.

  • U. Corresponds to the Specific User option in the UI.

  • E. Corresponds to the Specific Email Address option in the UI.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ToType>R</data:ToType> 
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<To> specifies the recipient for the email. The value of this element depends on the value in the <ToType> element, as follows:

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:To>O_Primary Owner Id</data:To>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<Subject> contains the subject line for the email.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:Subject>New Opportunity</data:Subject> 
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<EmailFormat> specifies the format for the email message, which can be Plain Text or HTML.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:EmailFormat>HTML</data:EmailFormat>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

<MessageBody> contains the content of the email message. For information about the HTML elements that are supported for use in workflow email messages, see Oracle CRM On Demand Online Help.

Note: When updating or inserting a workflow action with an email message in HTML format, the left angle bracket (<) at the start of each HTML tag must be encoded as &lt;. At the end of the HTML tag, the right angle bracket (>) can be used, or it can be encoded as &gt;. When you extract a workflow action that has an email message in HTML format, Oracle CRM On Demand automatically encodes the left angle brackets in the extracted email message.
<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:MessageBody>A new &lt;b>high 
     potential&lt;/b> opportunity has been
     created.</data:MessageBody>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

For workflow rules where <RecordType> contains Analytics and <TriggerEvent> contains ScheduledEvent only.

<ContentType> specifies the type of Analytics object to execute. Possible value are Analysis, Dashboard, and Dashboard Page. For more information about creating scheduled events for the Analytics record type and configuring one or more Send Email actions on the event, see Oracle CRM On Demand Online Help.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ContentType>Analysis
    </data:ContentType>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

For workflow rules where <RecordType> contains Analytics and <TriggerEvent> contains ScheduledEvent only.

<ContentFormat> specifies the type of output to generate. Possible values depend on the value of <ContentType> as follows:

  • Analysis. CSV, MHTML, PDF, and XLSX.

  • Dashboard. XLSX.

  • Dashboard Page. PDF and XLSX.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ContentFormat>PDF
    </data:ContentFormat>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

For workflow rules where <RecordType> contains Analytics, the <TriggerEvent> contains ScheduledEvent, and <ContentType> for the Send Email action contains Analysis only.

<SendEmailIfNoResults> specifies whether an email is to be sent (Y) or not to be sent (N) to a user if the analysis returns no results for that user.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:SendEmailIfNoResults>Y</data:SendEmailIfNoResults>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

For workflow rules where <RecordType> contains Analytics and <TriggerEvent> contains ScheduledEvent only.

<ContentPath> specifies the path for the Analytics object.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ContentPath>Content Path 2
    </data:ContentPath>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

For workflow rules where <RecordType> contains Analytics and <TriggerEvent> contains ScheduledEvent only.

<Parameters> specifies any parameters that are to be applied at runtime. If any filter parameters are present, then the syntax of those parameters is validated when you insert or update the workflow action. For information about specifying parameters, see Oracle CRM On Demand Online Help.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:Parameters>
P0=1&amp;P1=like&amp;P2="Account"."Account ID"&amp;P3=ACME%25
</data:Parameters>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

The <ListOfWorkflowEmailTranslations> section contains the translation values for the email subject and message.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ListOfWorkflowEmailTranslations>
. . .
    </data:ListOfWorkflowEmailTranslations>
. . .
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

The <WorkflowEmailTranslation> section contains the translation values for the email subject and message, for one language:

  • <LanguageCode> contains the three-letter language code for a language. For the list of language codes, see Language Codes and Their Corresponding Language and Country.

  • <SubjectTranslation> contains the email subject line in the language identified by the language code.

  • <MessageBodyTranslation> contains the email message body text in the language identified by the language code.

<data:WorkflowAction>
. . .
  <data:WorkflowSendEmailAction>
. . .
    <data:ListOfWorkflowEmailTranslations>
      <data:WorkflowEmailTranslation>
        <data:LanguageCode>ENU
        </data:LanguageCode>
        <data:SubjectTranslation>
         New Opportunity
        </data:SubjectTranslation>
        <data:MessageBodyTranslation>
         A new &lt;b>high potential&lt;/b>
         opportunity has been created.
        </data:MessageBodyTranslation>
      </data:WorkflowEmailTranslation>
. . .
    </data:ListOfWorkflowEmailTranslations>
  </data:WorkflowSendEmailAction>
</data:WorkflowAction>

Create Task Workflow Action Set

The following table describes the elements and sections in the Create Task workflow action set XML output file.

Table Elements and Sections in the Create Task Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Approval
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction> 
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction> 
  <data:Name>CreateTaskTest</data:Name> 
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or is inactive (false).

<data:WorkflowAction> 
. . .
  <data:Active>false</data:Active> 
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction> 
. . .
  <data:Order>3</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowCreateTaskAction> section contains the details of the Create Task workflow action.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Owner> specifies the owner for the task. The <Owner> element's value depends on the <OwnerType> element, as follows:

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
    <data:Owner>O_Primary Owner Id
    </data:Owner>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<OwnerType> corresponds to the Owner field in the user interface. The valid values are:

  • R. Corresponds to the Relative User On Record option in the user interface.

  • U. Corresponds to the Specific User option in the user interface.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:OwnerType>R</data:OwnerType>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Type> is the activity type.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:Type>Approval</data:Type>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<SubType> is the activity subtype.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:SubType>Callback</data:SubType>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<DueDate> contains an expression that evaluates to the due date for the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:DueDate>Today()+2</data:DueDate>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Priority> specifies the priority of the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:Priority>2-Medium</data:Priority>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Status> specifies the status of the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:Status>Not Started</data:Status>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<TaskCurrency> contains the three-character currency code for the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:TaskCurrency>CAD
    </data:TaskCurrency>
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Private> specifies whether the task is visible only to the task user (true), or is visible to users other than the task user (false).

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:Private>false</data:Private> 
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Subject> contains the subject line for the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    </data:Subject> 
. . .
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

<Description> contains the description of the task.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateTaskAction>
. . .
    <data:Description></data:Description> 
  </data:WorkflowCreateTaskAction>
</data:WorkflowAction>

System Names and Display Names for Owner and To Element Values for Relative User on Record

The following table shows the system names and corresponding display names for the values that can appear in the following elements:

  • The <Owner> element in the Create Task workflow action set XML file, when the <OwnerType> element is set to R (Relative User on Record).

  • The <To> element in the Send Email workflow action set XML file, when the <ToType> element is set to R (Relative User on Record).

    Note: The T_Team Role values are available for the Account, Contact, Lead, Opportunity, and Service Request record types only.

    Table System Names and Display Names for the Owner and To Element Values for Relative User On Record

    System Name in the XML File Display Name

    C_

    Service Request Created By

    MA_Account Id

    Account Owner's Manager

    M_Owned By Id

    Object Owner's Manager

    M_Owner Id

    Lead Owner's Manager

    M_Primary HH Owner Id

    Household Owner's Manager

    M_Primary Owner Id

    Object Owner's Manager

    M_Sales Rep Id

    Salesperson's Manager

    OA_Account Id

    Account Owner

    O_Owned By Id

    Service Request Owner

    O_Owner Id

    Lead Owner

    O_Primary HH Owner Id

    Household Owner

    O_Primary Owner Id

    Object Owner

    O_Sales Rep Id

    Salesperson

    T_Team Role_Consultant

    Object Team - Consultant

    T_Team Role_Executive Sponsor

    Object Team - Executive Sponsor

    T_Team Role_Other

    Object Team - Other

    T_Team Role_Owner

    Object Team - Owner

    T_Team Role_Partner

    Object Team - Partner

    Note: For the Account, Contact, Lead, Opportunity, and Service Request record types, any custom roles that are added to the record type can be used in the Relative User on Record element, in addition to the values shown in the previous table. The system name for a custom team role is in the format T_Team Role_ teamrolename, where teamrolename is the name given to the team role.

Wait Action Workflow Action Set

The following table describes the elements and sections in the Wait workflow action set XML output file.

Table Elements and Sections in the Wait Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Approval
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction>
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction>
  <data:Name>WaitTest</data:Name> 
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction>
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction>
. . .
  <data:Order>4</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowWaitAction> section contains the details of the Wait workflow action.

<data:WorkflowAction>
. . .
  <data:WorkflowWaitAction>
. . .
  </data:WorkflowWaitAction> 
</data:WorkflowAction>

<ReevaluateRuleConditionsAfterWait> determines whether the workflow rule condition is to be reevaluated when the waiting period ends (true) or the workflow rule condition is not to be reevaluated (false).

<data:WorkflowAction>
. . .
  <data:WorkflowWaitAction>
   <data:ReevaluateRuleConditionsAfterWait>
    true
   </data:ReevaluateRuleConditionsAfterWait>
. . .
  </data:WorkflowWaitAction> 
</data:WorkflowAction>

<WaitType> specifies the type of wait period selected in the user interface. The values that are valid are:

  • Period

  • Period Expression

  • Date Time

  • Date Time Expression

<data:WorkflowAction>
. . .
  <data:WorkflowWaitAction>
. . .
    <data:WaitType>Period</data:WaitType>
. . .
  </data:WorkflowWaitAction> 
</data:WorkflowAction>

<DateTime> specifies the date and time the wait period will end, if the <WaitType> value is Date Time.

<data:WorkflowAction>
. . .
  <data:WorkflowWaitAction>
. . .
    <data:DateTime></data:DateTime>
. . .
  </data:WorkflowWaitAction> 
</data:WorkflowAction>

<WaitExpression> contains an expression that specifies the wait period, if the <WaitType> value is Period Expression or Date Time Expression. If the <WaitType> value is Period, then <WaitExpression> indicates the period as PYMDTHM. For example:

  • PYM10DTHM indicates 10 days.

  • P1Y3MDTHM indicates 1 year and 3 months.

  • PYMDT5H15M indicates 5 hours and 15 minutes.

<data:WorkflowAction>
. . .
  <data:WorkflowWaitAction>
. . .
    <data:WaitExpression>PYM10DTHM
    </data:WaitExpression>
  </data:WorkflowWaitAction> 
</data:WorkflowAction>

Field Update Workflow Action Set

The following table describes the elements and sections in the Field Update workflow action set XML output file.

Table Elements and Sections in the Field Update Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Approval
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction> 
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction> 
  <data:Name>UpdateFieldTest</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction> 
. . .
  <data:Active>true</data:Active> 
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

Note: A Field Update Workflow action must be preceded by at least one Wait action.
<data:WorkflowAction> 
. . .
  <data:Order>5</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowFieldUpdateAction> section contains the details of the Update Values workflow action.

<data:WorkflowAction> 
. . .
  <data:WorkflowFieldUpdateAction>
. . .
  </data:WorkflowFieldUpdateAction>
</data:WorkflowAction>

<FieldName> is the system name of the field.

<data:WorkflowAction> 
. . .
  <data:WorkflowFieldUpdateAction>
    <data:FieldName>Total Asset Value
    </data:FieldName>
. . .
  </data:WorkflowFieldUpdateAction>
</data:WorkflowAction>

<Value> is the new value for the field.

<data:WorkflowAction> 
. . .
  <data:WorkflowFieldUpdateAction>
. . .
    <data:Value>10000</data:Value>
. . .
  </data:WorkflowFieldUpdateAction>
</data:WorkflowAction>

<OverwriteExistingValues> specifies whether the existing value in the field (if the field has an existing value) is to be overwritten with the new value (true) or is not to be overwritten (false). If the field is empty, the field is updated with the new value, even if <OverwriteExistingValues> is set to false.

<data:WorkflowAction> 
. . .
  <data:WorkflowFieldUpdateAction>
. . .
    <data:OverwriteExistingValues>true
    </data:OverwriteExistingValues>
  </data:WorkflowFieldUpdateAction>
</data:WorkflowAction>

Create Integration Event Workflow Action Set

The following table describes the elements and sections in the Create Integration Event workflow action set XML output file.

Table Elements and Sections in the Create Integration Event Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Opportunity Approval
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction> 
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction> 
  <data:Name>EventQueue</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction> 
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction> 
. . .
  <data:Order>6</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowCreateIntegrationEvent> section contains the details of the Create Integration Event workflow action.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

The <ListOfQueues> section specifies the queues to which the integration events are to be written. <QueueName> contains the name of a queue.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
    <data:ListOfQueues>
      <data:QueueName>Default Queue
      </data:QueueName>
    . . .
    </data:ListOfQueues>
. . .
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

The <ListOfFields> section specifies the fields that are tracked by the Create Integration Event workflow action.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
    <data:ListOfFields>
. . .
    </data:ListOfFields>
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

<FieldName> contains the system name of the field.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
    <data:ListOfFields>
      <data:FieldName>Currency Code
      </data:FieldName>
. . .
    </data:ListOfFields>
. . .
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

<AlwaysInclude> specifies whether the field is included in the integration event, even if the value of the field has not been changed (true) or if the field is included in the integration event only when the value of the field is changed (false).

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
    <data:ListOfFields>
      <data:AlwaysInclude>true
      </data:AlwaysInclude>
. . .
    </data:ListOfFields>
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

<TrackChanges> specifies whether an integration event is generated each time the field is updated (true). The workflow action creates an integration event only if <TrackChanges> is set to true for at least one field, and if a change is detected in at least one of the fields for which <TrackChanges> is set to true.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
    <data:ListOfFields>
. . .
      <data:TrackChanges>true
      </data:TrackChanges>
    </data:ListOfFields>
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

<SchemaVersion> specifies the Web service schema version that is to be used for the integration events. Web Services v2.0 is the default value.

<data:WorkflowAction> 
. . .
  <data:WorkflowCreateIntegrationEventAction>
. . .
    <data:SchemaVersion>Web Services v2.0
    </data:SchemaVersion>
  </data:WorkflowCreateIntegrationEventAction>
</data:WorkflowAction>

Submit Call Workflow Action Set

The following table describes the elements and sections in the Submit Call workflow action set XML output file.

Note: The Submit Call workflow action is available only in Oracle CRM On Demand Life Sciences Edition.

Table Elements and Sections in the Submit Call Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>Activity Insert
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction>
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction>
  <data:Name>Auto Call Submit</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction>
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction>
. . .
  <data:Order>1</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowSubmitCallAction> section contains no data. For more information about the Submit Call action and how you can use it, see Oracle CRM On Demand Disconnected Mobile Sales Administration Guide, which is available from the Oracle CRM On Demand documentation library in Oracle Help Center.

<data:WorkflowAction>
. . .
  <data:WorkflowSubmitCallAction/>
</data:WorkflowAction>

Submit Workflow Action Set

The following table describes the elements and sections in the Submit workflow action set XML output file.

Note: The Submit workflow action is available only in Oracle CRM On Demand Life Sciences Edition.

Table Elements and Sections in the Submit Workflow Action Set XML File

Description Element or Section

<WorkflowName> contains the name of the workflow rule with which this action is associated. When performing an Upsert or InsertOrUpdate operation for workflow actions, this name is used to find a matching workflow rule.

<data:WorkflowName>MyTestSubmitTrans
</data:WorkflowName>

The <WorkflowAction> section contains the details of the workflow action.

<data:WorkflowAction>
. . .
</data:WorkflowAction>

<Name> is the name of the workflow action.

<data:WorkflowAction>
  <data:Name>AutoTransSubmit</data:Name>
. . .
</data:WorkflowAction>

<Active> specifies whether the workflow action is active (true) or inactive (false).

<data:WorkflowAction>
. . .
  <data:Active>true</data:Active>
. . .
</data:WorkflowAction>

<Order> is the order number for the workflow action within the set of actions on the workflow rule. It determines the order in which Oracle CRM On Demand invokes the sequence of workflow actions on the workflow rule.

<data:WorkflowAction>
. . .
  <data:Order>1</data:Order>
. . .
</data:WorkflowAction>

The <WorkflowSubmitTransactionAction> section contains no data. For more information about using the Submit action for submitting sample transactions, see Oracle CRM On Demand Online Help.

<data:WorkflowAction>
. . .
  <data:WorkflowSubmitTransactionAction/>
</data:WorkflowAction>

Elements and Sections in the Workflow User Sets Output File

The following table describes the elements and sections in the workflow user sets XML file.

Table Elements and Sections in the Workflow User Sets XML File

Description Element or Section

<WorkflowName> specifies the name of the workflow rule. This field has a maximum of 50 characters.

<data:WorkflowUserSet>
  <data:WorkflowName>Opportunity Rule
  </data:WorkflowName> 
. . .
</data:WorkflowUserSet> 

The <ListOfWorkflowUsers> section contains the workflow user set for the workflow.

<data:WorkflowUserSet>
. . .
  <data:ListOfWorkflowUsers>
. . .
  </data:ListOfWorkflowUsers> 
</data:WorkflowUserSet>

The <WorkflowUser> section contains the data for a user in the following elements:

  • UserLastName. The user’s last name.

  • UserFirstName. The user’s first name.

  • UserFullName. The user’s full name.

  • UserEmail. The user’s email address.

  • UserAlias. The user alias of the user.

  • UserId. The user’s ID.k

  • UserExternalSystemId. The external system ID of the user.

  • UserLoginName. The login name for the user.

<data:WorkflowUserSet>
. . .
  <data:ListOfWorkflowUsers>
    <data:WorkflowUser>
      <data:UserLastName>Lee
      </data:UserLastName>
      <data:UserFirstName>Joey
      </data:UserFirstName>
      <data:UserFullName>Joey Lee
      </data:FullLastName>
      <data:UserEmail>Jolee@test.com
      </data:UserEmail>
      <data:UserAlias>Jolee</data:UserAlias>
      <data:UserId>IQA2-13BMET</data:UserId>
      <data:UserExternalSystemId>Jli
      </data:UserExternalSystemId>
      <data:UserLoginName>JLICORP/ADMIN
      </data:UserLoginName>
    <data:WorkflowUser>
. . .
  </data:ListOfWorkflowUsers> 
</data:WorkflowUserSet>

Migrating Workflow Rules

The following topics provide examples of how to use the Oracle Migration Tool On Demand client with workflow rules:

Note: Back up your configuration data and all other relevant data before running the Oracle Migration Tool On Demand client.

Extracting a Workflow Rule or a Workflow Rule Set

This topic describes how to extract a single workflow rule or a workflow rule set from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment. The output from the extract is saved to the <TriggerEvent>.xml file in the following directory:

  • If the ParentRecordType parameter has an empty value, then the output from the extract is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType 
    
  • If the ParentRecordType parameter does not have an empty value, then the output from the extract is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType/ParentRecordType
    

If the workflow rule set has multiple parent record types, then only the relative order changes.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to extract a workflow rule set:

migrationtool -u UserID -s ServerURL Read WorkflowRuleSet RecordType TriggerEvent [ParentRecordType] [WorkflowName]

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.

  • RecordType is the system name of the Oracle CRM On Demand record type (object) for the workflow rule. If the string contains spaces, then it must be enclosed with quotation marks.

  • TriggerEvent is the language-independent code (LIC) for the event type, see the table in Language-Independent Codes for Trigger Events.

  • ParentRecordType is the system name of the Oracle CRM On Demand parent record type (object). If the string contains spaces, then it must be enclosed with quotation marks.

  • WorkflowName is the name of the Oracle CRM On Demand rule. You can read an individual workflow rule by specifying a value for the <WorkflowName> parameter.

Note: The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (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 Extracting a Single Workflow Rule

The following is an example of extracting a specific workflow rule:

migrationtool -u UserID -s ServerURL Read WorkflowRuleSet "" "" "" MyWorkflowRule
Note: If the workflow rule name contains spaces, then it must be enclosed with quotation marks.

Example of Extracting a Workflow Rule Set

The following is an example of extracting the entire sequence of workflow rules based on the Account record type and the Before Modified Record Saved trigger event:

migrationtool -u UserID -s ServerURL Read WorkflowRuleSet Account PreWriteRecord

Extracting All Workflow Rule Sets

This topic describes how to extract all workflow rule sets from your Oracle CRM On Demand environment; that is, a customer test environment or production environment. The output from the extract is saved to the TriggerEvent.xml file in the following directory:

  • If the ParentRecordType parameter has an empty value, then the output is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType 
    
  • If the ParentRecordType parameter does not have an empty value, then the output is saved to the following directory:

    .../repository/WorkflowRuleSet/RecordType/ParentRecordType
    

The number of records returned is not limited for the ReadAll command. If the workflow rule set has multiple parent record types, then only the relative order changes. You must correct this error by using the workflow functionality of Oracle CRM On Demand.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to extract all workflow rule sets:

migrationtool -u UserID -s ServerURL ReadAll WorkflowRuleSet

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.

Note: The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (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 Extracting All Workflow Rule Sets

The following is an example of extracting all workflow rule sets from your Oracle CRM On Demand server:

migrationtool -u UserID -s ServerURL ReadAll WorkflowRuleSet

Updating or Inserting Workflow Rules (Upsert)

This topic describes how to use the Upsert command to update workflow rules (if they exist) or insert workflow rules (if they do not exist) in 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 Upsert operation.

About the Upsert Operation

When you run the Upsert command, the existing workflow rules are updated, new workflow rules are inserted, and rules that are not in the request are deleted. The order of the rules in the workflow request must match the order of the rules for the workflow result in the Oracle CRM On Demand application. The changes following the Upsert operation are applied completely or not at all.

For more information about the considerations that apply to Upsert operations, see Considerations That Apply to Upsert Operations.

Syntax

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

migrationtool -u UserID -s ServerURL Upsert WorkflowRuleSet WorkflowRulesXML

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.

  • WorkflowRulesXML is the fully qualified path name of the workflow rules XML file, for example:

    C:\My Files\My WorkflowRules.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 Rules

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

migrationtool -u UserID -s ServerURL Upsert WorkflowRuleSet "C:\My Files\My WorkflowRules.xml"
Note: Quotation marks are required only if the path or file name contains spaces.

Updating or Inserting Workflow Rules (InsertOrUpdate)

This topic describes how to use the InsertOrUpdate command to update workflow rules (if they exist) or insert workflow rules (if they do not exist) in 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.

About the InsertOrUpdate Operation

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

  1. <RecordType> and <TriggerEvent> and <Order>

  2. <WorkflowName>

If Oracle CRM On Demand locates a workflow rule based on the user keys, then the workflow rule is updated.

If Oracle CRM On Demand cannot locate any workflow rule based on the user keys, then a new workflow rule is created.

Unlike the Upsert operation, the InsertOrUpdate operation does not delete any existing workflow rules that are not identified 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 rules (if they exist) and insert new workflow rules (if they do not exist):

migrationtool -u UserID -s ServerURL InsertOrUpdate WorkflowRuleSet WorkflowRulesXML

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.

  • WorkflowRulesXML is the fully qualified path name of the workflow rules XML file, for example:

    C:\My Files\My WorkflowRules.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.

Deleting a Workflow Rule Set

This topic describes how to delete a workflow rule set based on the specified record type and trigger event. The set of workflow rules is deleted from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment.

Note: The Delete operation can delete any existing workflow rule set even if the authenticated user does not have access to the object.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to delete a workflow rule set:

migrationtool -u UserID -s ServerURL Delete WorkflowRuleSet RecordType TriggerEvent [ParentRecordType] [WorkflowName]

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.

  • RecordType is the system name of the Oracle CRM On Demand record type (object) for the workflow rule. If the string contains spaces, then it must be enclosed with quotation marks.

  • TriggerEvent is the language-independent code (LIC) for the event type, see Language-Independent Codes for Trigger Events.

  • ParentRecordType is the system name of the Oracle CRM On Demand parent record type (object). If the string contains spaces, then it must be enclosed with quotation marks.

  • WorkflowName is the name of the Oracle CRM On Demand workflow rule. You can delete an individual workflow rule by specifying a value for the WorkflowName parameter.

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 Deleting a Workflow Rule Set

The following is an example of deleting the entire sequence of workflow rules based on the Account record type and the Before Modified Record Saved trigger event:

migrationtool -u UserID -s ServerURL Delete WorkflowRuleSet Account PreWriteRecord

Migrating Workflow Action Sets

The following topics provide examples of how to use the Oracle Migration Tool On Demand client with workflow actions and workflow action sets:

Note: Back up your configuration data and all other relevant data before running the Oracle Migration Tool On Demand client.

Extracting a Workflow Action or a Workflow Action Set

This topic describes how to extract a single workflow action or a single workflow action set from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment. The output from the extract is saved to a file and directory as follows:

.../repository/WorkflowActionSet/WorkflowRuleName.xml

Authenticated users can extract a specific workflow action or workflow action set. The Read operation can read any existing action set even if the authenticated user does not have access to the object or trigger event for the specified workflow.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to extract a specific workflow action or workflow action set:

migrationtool -u UserID -s ServerURL Read WorkflowActionSet WorkflowRuleName [WorkflowActionName] [ActiveFlag]

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.

  • WorkflowRuleName is the name of a workflow rule. If the string contains spaces, then it must be enclosed with quotation marks.

  • WorkflowActionName is the name of a workflow action. If the string contains spaces, then it must be enclosed with quotation marks.

  • ActiveFlag is an optional argument that you can use to filter the workflow actions that are exported, based on the value of the Active check box on the workflow actions. The valid values are true (the Active check box is selected) and false (the Active check box is not selected.

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 Extracting a Single Workflow Action

The following is an example of extracting a specific workflow action:

migrationtool -u UserID -s ServerURL Read WorkflowActionSet MyWorkflowRule MyWorkflowAction
Note: If the workflow rule name contains spaces, then it must be enclosed with quotation marks. Similarly, if the workflow action name contains spaces, then it must be enclosed with quotation marks.

Example of Extracting a Single Workflow Action Set

The following is an example of extracting the action set for a specific workflow rule:

migrationtool -u UserID -s ServerURL Read WorkflowActionSet MyWorkflowRule
Note: If the workflow rule name contains spaces, then it must be enclosed with quotation marks.

Example of Extracting Active Workflow Actions in a Single Workflow Action Set

The following is an example of extracting only the workflow actions that are active in a specific workflow rule:

migrationtool -u UserID -s ServerURL Read WorkflowActionSet MyWorkflowRule "" true
Note: If the workflow rule name contains spaces, then it must be enclosed with quotation marks.

Extracting Workflow Action Sets That Are Related to a Workflow Rule Set

This topic describes how to extract all action sets that are related to a rule set from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment.

One WorkflowActionSet.xml file is extracted for each action set identified by the input record type, trigger event, and parent record type. The output for each action set matches the data that is extracted if a specific Read operation is used to retrieve the action set.

The output WorkflowActionSet.xml file is saved to the following directory:

  • If the ParentRecordType parameter has an empty value, then the output is saved to the following directory:

    .../repository/WorkflowActionSet/RecordType/TriggerEvent.xml 
    
  • If the ParentRecordType parameter does not have an empty value, then the output is saved to the following directory:

    .../repository/WorkflowActionSet/RecordType/ParentRecordType
    /TriggerEvent.xml
    

Authenticated users can extract a specific workflow action set. The Read operation can read any existing action set even if the authenticated user does not have access to the object or trigger event for the specified workflow.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to extract workflow action sets that are related to a workflow rule set:

migrationtool -u UserID -s ServerURL ReadForRuleSet WorkflowActionSet RecordType TriggerEvent [ParentRecordType]

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.

  • RecordType is the system name of the Oracle CRM On Demand record type (object) for the workflow rule. If the string contains spaces, then it must be enclosed with quotation marks.

  • TriggerEvent is the language-independent code (LIC) for the event type, see Language-Independent Codes for Trigger Events.

  • ParentRecordType is the system name of the Oracle CRM On Demand parent record type (object). If the string contains spaces, then it must be enclosed with quotation marks.

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 Extracting Workflow Action Sets That Are Related to a Workflow Rule Set

The following is an example of extracting workflow action sets that are related to a workflow rule set, when a new Account record is saved:

migrationtool -u UserID -s ServerURL ReadForRuleSet WorkflowActionSet Account WriteRecordNew 

Updating or Inserting a Workflow Action Set (Upsert)

This topic describes how to use the Upsert command to update a workflow action set (if it exists) or insert a workflow action set (if it does not exist) in 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 Upsert operation.

Running an Upsert operation on a workflow action set is a synchronization operation. At the end of the operation, the workflow action set matches the action set in the XML file, where possible. Existing workflow actions are updated, new actions are inserted, and actions that are not in the request are deleted. The order of the actions in the workflow request matches the order of the actions in the action set XML file. The updates to workflow action sets in an Upsert 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 a specific workflow action set (if it exists) or to insert the workflow action set (if it does not exist):

migrationtool -u UserID -s ServerURL Upsert 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 a Workflow Action Set

The following is an example of updating a workflow action set (if it exists) or inserting a workflow action set (if it does not exist) in your Oracle CRM On Demand server:

migrationtool -u UserID -s ServerURL Upsert WorkflowActionSet "C:\My Files\My WorkflowActionSet.xml"
Note: Quotation marks are required only if the path or file name contains spaces.

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.

Migrating Workflow User Sets

The following topics provide examples of how to use the Oracle Migration Tool On Demand client with workflow user sets:

Note: Back up your configuration data and all other relevant data before running the Oracle Migration Tool On Demand client.

Extracting Workflow User Sets

This topic describes how to extract the workflow user sets from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment. The output from the extract is saved to a directory as follows:

.../repository/WorkflowUserSet/WorkflowRuleName.xml

Authenticated users can extract workflow user sets. The ReadForRuleSet operation can read any existing user set even if the authenticated user does not have access to the Analytics object or ScheduledEvent trigger event for the specified workflow.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to extract workflow user sets:

migrationtool -u UserID -s ServerURL ReadForRuleSet WorkflowUserSet RecordType TriggerEvent [ParentRecordType]

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.

  • RecordType is Analytics.

  • TriggerEvent is ScheduledEvent the language-independent code (LIC) for the event type of scheduled event, see Language-Independent Codes for Trigger Events.

  • ParentRecordType is the system name of the Oracle CRM On Demand parent record type (object). If the string contains spaces, then it must be enclosed with quotation marks.

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 Extracting Workflow User Sets

The following is an example of extracting the workflow user sets:

migrationtool -u UserID -s ServerURL ReadForRuleSet WorkflowUserSet Analytics ScheduledEvent

Updating or Inserting Workflow User Sets (InsertOrUpdate)

This topic describes how to use the InsertOrUpdate command to update a workflow user set (if it exists) and insert a workflow user set (if it does 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.

About the InsertOrUpdate Operation

To insert users you specify the workflow name with unique values for the <UserID> or <UserLoginName> child elements of <WorkflowUser>. If some of the specified user data results in an error, for example, if a value for a user is not unique, the whole request is rolled back.

When you run the InsertOrUpdate command, the following happens:

  • If Oracle CRM On Demand locates a matching workflow user based on the user keys, then the workflow user is updated.

  • Existing workflow users that are not included in the XML request are not affected. The InsertOrUpdate operation does not delete any existing workflow users 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 users (if they exist) and to insert workflow users (if they do not exist):

migrationtool -u UserID -s ServerURL InsertOrUpdate WorkflowUserSet WorkflowUsersXML

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.

  • WorkflowUsersXML is the fully qualified path name of the workflow user set XML file, for example:

    C:\My Files\My WorkflowUserSet1.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 a Workflow User Set

The following is an example of updating a workflow user set (if it exists) or inserting a workflow user set (if it does not exist) in your Oracle CRM On Demand server:

migrationtool -u UserID -s ServerURL InsertOrUpdate WorkflowUserSet "C:\My Files\My WorkflowUserSet.xml"
Note: Quotation marks are required only if the path or file name contains spaces.

Deleting a Workflow User

This topic describes how to delete a workflow user. The workflow user is deleted from your Oracle CRM On Demand server for your environment; that is, a customer test environment or production environment.

Note: The Delete operation can delete any existing workflow user even if the authenticated user does not have access to the object.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to delete a workflow user:

migrationtool -u UserID -s ServerURL Delete WorkflowUserSet WorkflowName UserID UserLoginName 

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.

  • WorkflowName is the name of the Oracle CRM On Demand workflow rule.

  • UserID is the user ID of the user in the workflow user set.

  • UserLoginName is the login name of the user in the workflow user set.

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 Deleting a Workflow User

The following is an example of deleting a workflow user.

migrationtool -u UserID -s ServerURL Delete WorkflowUserSet AnalyticsWF3 "" "JELICORP/JOEYLI1"