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.