MngUpdateWorkflowRule¶
Updates an existing workflow chain. If trigger, conditions or actions are changed, backend validates the complete trigger -> conditions -> actions contract.
Access¶
SESSION_ADMIN only.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Workflow rule id |
brand |
string | No | Brand namespace |
code |
string | No | Unique rule code within brand |
name |
string | No | Rule name |
trigger |
string | No | Trigger code |
conditions |
array/string | No | Flat AND conditions |
actions |
array/string | No | Action list |
scope |
int | No | 0 CRM, 1 BO, 2 both |
status |
int | No | 0 active, 1 disabled, 2 archived |
priority |
int | No | Sort priority |
stop_processing |
int | No | 0 or 1 |
Request¶
{
"command": "MngUpdateWorkflowRule",
"extID": "1",
"data": {
"id": 1,
"name": "Large Deposit Source Of Funds v2",
"priority": 200
}
}
Response Data¶
{
"rule": {
"id": 1,
"name": "Large Deposit Source Of Funds v2",
"priority": 200,
"updated_time": 1778160200
}
}
A provider action that the stored rule already has with the same type and params is
kept while its provider is offline, so other fields and the status can still be changed; a
new or changed one is rejected with PROVIDER_NOT_REGISTERED: <code>. See
Workflow provider actions.
Conditions on a bits field are validated against the flag dictionary and can be
refused with CONDITION_VALUE_TYPE, CONDITION_VALUE_EMPTY_MASK, or
CONDITION_VALUE_UNKNOWN_FLAG; see
MngValidateWorkflowRule.
Conditions on customer.country and account.country take an upper-case ISO
3166-1 alpha-2 code, for example "DE", and are refused with
CONDITION_VALUE_NOT_ALLOWED or CONDITION_VALUE_EMPTY_LIST otherwise. The
request is merged with the stored rule and the whole result is validated. A rule
saved earlier with a country name, such as "Germany", is therefore refused even
when the request changes only status or priority; send conditions with
country codes in the same request.