MockMotor is capable of setting up stateful scenarios where the mock accounts are updated by the results of the flow execution.
The most common scenario of the type is the registration. The initial mock account doesn’t have the account number but, at some point of the flow, that account number is created and now needs to be updated into the mock account.
The Update Accounts section updates the account (or accounts) selected during Account Selection step.
For example, here, we have the business account number (
BAN) and line of business (
The values are read from the request (
input variable) and placed into the selected account properties
Updating Multiple Accounts
You should be careful when updating multiple accounts. Every account selected in the Account Selection section gets updated.
Updating All Selected Accounts with the Same Value
You do not have to do anything special to update all selected accounts with the same value.
For example, when moving a number of accounts into a different department you need to update each of them with the new department number.
Then the following configuration will update each of the selected accounts property
depNo with the same new value:
Updating Selected Accounts with Different Values
In the Update Accounts section, the variable
account means the account that we’re currently updating.
If you’re updating multiple accounts, you can use it to control the values that each account gets.
For example, here is a request containing
update sections for multiple BANs, each BAN getting its own new SUB (subscriber id):
<update> <ban>MU1854986</ban> <subid>800145012</subid> </update> <update> <ban>MU2239856</ban> <subid>800145014</subid> </update>
The update expression then extracts the new value from the request based on the account’s own
ban property, so each account gets its own