rex_backendless_counter
Introduction
Atomic Counters to increase or decrease value.
Atomic Counters to increase or decrease value.
Usage
Increase
Sample capx
Call "Action:Increase" to increase or decrease the counter value.
"Condition:On increase", "Condition:On increase any" will be triggered when increasing success, get counter name, current value, or previous value by "Expression:CounterName", "Expression:CurrentValue", "Expression:PreviousValue".
Otherwise, "Condition:On increase error", "Condition:On increase any error" will be triggered, get error message by "Expression:ErrorMessage".
Sample capx
Call "Action:Increase" to increase or decrease the counter value.
"Condition:On increase", "Condition:On increase any" will be triggered when increasing success, get counter name, current value, or previous value by "Expression:CounterName", "Expression:CurrentValue", "Expression:PreviousValue".
Otherwise, "Condition:On increase error", "Condition:On increase any error" will be triggered, get error message by "Expression:ErrorMessage".
Get current value
Call "Action:Get current value" to get current counter value.
"Condition:On get current", "Condition:On get current any" will be triggered when get current value success, get counter name, current value by "Expression:CounterName", "Expression:CurrentValue".
Otherwise, "Condition:On get current error", "Condition:On get current any error" will be triggered, get error message by "Expression:ErrorMessage".
Call "Action:Get current value" to get current counter value.
"Condition:On get current", "Condition:On get current any" will be triggered when get current value success, get counter name, current value by "Expression:CounterName", "Expression:CurrentValue".
Otherwise, "Condition:On get current error", "Condition:On get current any error" will be triggered, get error message by "Expression:ErrorMessage".
Reset to 0
Call "Action:Reset" to reset counter value to 0.
"Condition:On reset", "Condition:On reset any" will be triggered when reset to 0 success, get counter name, current value(0) by "Expression:CounterName", "Expression:CurrentValue".
Otherwise, "Condition:On reset error", "Condition:On reset any error" will be triggered, get error message by "Expression:ErrorMessage".
Call "Action:Reset" to reset counter value to 0.
"Condition:On reset", "Condition:On reset any" will be triggered when reset to 0 success, get counter name, current value(0) by "Expression:CounterName", "Expression:CurrentValue".
Otherwise, "Condition:On reset error", "Condition:On reset any error" will be triggered, get error message by "Expression:ErrorMessage".
Compare then set
Sample capx
Call "Action:Compare then set" to set counter only when the counter value is equal to a specific value, otherwise this action will be ignored.
"Condition:On compare then set", "Condition:On compare then set any" will be triggered when action success, get counter name by "Expression:CounterName". And "Condition:Is value set" will return true if the counter value is set by this action.
Otherwise, "Condition:On compare then set error", "Condition:On compare then set any error" will be triggered, get error message by "Expression:ErrorMessage".
Sample capx
Call "Action:Compare then set" to set counter only when the counter value is equal to a specific value, otherwise this action will be ignored.
"Condition:On compare then set", "Condition:On compare then set any" will be triggered when action success, get counter name by "Expression:CounterName". And "Condition:Is value set" will return true if the counter value is set by this action.
Otherwise, "Condition:On compare then set error", "Condition:On compare then set any error" will be triggered, get error message by "Expression:ErrorMessage".