When we built the sample, we promoted the Filter pattern
property, to allow us to change the value of the property at runtime.
Now, we will change the value of the Filter pattern property in the
unit test environment's administrative console, which will cause the
request to be sent to a different service. We will view the result
in the test client emulator.
To perform the actions described in this task, the server
scripts must be run to install the runtime components. For instructions,
see
Install the runtime components.
Open the StockQuote assembly diagram, and follow these steps
to test the promoted property of the Filter primitive:
- Right-click StockQuote_MediationFlow and select Test Component.
- In the Events page, enter these initial request parameters,
and click Continue.
- For symbol, enter AAA.
- For customerID, enter CustomerB.
- Select the server for the unit test environment. Click Finish and enter the username and password to login to
the server. The default is admin\admin.
The results
in the emulator show that the service invoked is RealtimeService.
You can also see the value of the qualityOfService string which tells
you that this customer's service level is premium.
- Switch to the Servers view. Right-click the server, and
select Administration > Run administrative console. In the log in window, enter your userid and password (the default
is admin/admin). Click Log in.
- In the administrative console, expand Applications and click SCA modules.
- In the list of applications, click StockQuote.
- Click Module Properties.
- The property that we promoted earlier is displayed, showing
the alias PREMIUM_SERVICE. Click the value field of PREMIUM_SERVICE,
and change "premium" to "standard". Click Apply.
- In the messages window, click Save.
- In the SCA Modules window, click the Save button.
- Switch to the Events page of the test client. Click Invoke
on the
upper left side of the page.
- Keep AAA as the symbol value, and
enter CustomerB, the premium service customer,
as the customerID value. Click Continue
The results in the Events area show DelayedService as
the invoked service.