Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Administrative Services API Calls >
WorkflowRuleSetUpsert
Updates existing workflow rule configuration data or inserts new data. The Manage Workflow Rules privilege is required (to create workflow rules for the User record type, the Manage Workflow Rules for User privilege is also required). Additionally, the Workflow Cancel Save privilege is required if the Cancel save setting is to be updated or inserted. NOTE: It is recommended that you use the WorkflowRuleSetInsertOrUpdate method rather than the WorkflowRuleSetUpsert method.
Usage
Use the WorkflowRuleSetUpsert method to update or insert workflow rule configuration data. The Manage Workflow Rules privilege is required. CAUTION: New workflow rules are inserted. Existing workflow rules are updated, but existing workflow rules that are not in the request are deleted.
The apData:WorkflowRuleSet argument has the following child elements:
- RecordType. The record type (required).
- TriggerEvent. The event that triggers the workflow rule (required). The possible values and the associated trigger events are as follows:
|
|
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 |
- ParentRecordType. The parent record type. This is specified if the trigger event is After Association With Parent or After Dissociation From Parent. These trigger events are supported only for the Account, Contact, and Opportunity record types.
- ListOfWorkflowRules. The list of workflow rules for the record type and trigger event. Each <WorkflowRule> element has the following child elements:
- WorkflowName. The name of the workflow rule (required). This name is used to reference an associated workflow action set.
- Active. Whether the workflow rule is enabled or disabled.
- Exit. Whether exiting a workflow in a sequence of workflows is enabled. If the condition on the rule is met, the active actions on the workflow rule are performed. However, none of the subsequent workflow rules that are based on the same record type and the same trigger event, and where applicable, the same parent record type, are triggered.
- Description. A description of the workflow rule.
- WorkflowRuleCondition. The condition for the workflow rule.
- CancelSave. Whether Cancel Save processing is performed, if the condition is not met.
- Order. The order number for the workflow rule. The order number 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.
- DisplayMessage. The message returned if the condition is met, and if cancel save processing is performed.
- ListOfWorkFlowTranslations. Translations in the languages activated for your company of the display messages that are returned if the condition on a rule is not met and the save operation is canceled. Each <WorkflowTranslation> element has the following child elements:
For more information about workflow rules, see Oracle CRM On Demand Online Help. Arguments
Table 171 describes the arguments taken by the WorkflowRuleSetUpsert method.
Table 171. Arguments Taken by the WorkflowRuleSetUpsert Method
|
|
|
|
|
apData:WorkflowRuleSet |
The workflow rule data to be updated or inserted. |
Yes |
Not applicable |
Input |
Status |
The status of the call. |
Not applicable |
Not applicable |
Output |
Return Value of the Call
The status is returned.
|