As the first example (Figure 3.22), the ResourceDemandingSEFF of the service HandleShipping from an online-store component is depicted. It has been specified by a component developer in a parametrised form. The service calls required services shipping a customer's order with different charges depending on its costs, which it gets passed as an input parameter. If the order's total amount is below 100 Euros, the service calls a service preparing a shipment with full charges (ShipFullCharges). If the costs are between 100 and 200 Euros, the online store grants a discount, so ShipReducedCharges is called. Orders priced more than 200 Euros are shipped for free with the ShipWithoutCharges service.
Once a domain expert specifies the value of the parameter costs, it can be derived which of the services will be called.
The second exmample (Figure 3.23) illustrate assigning a number of iterations to a loop in a parameterisable way. The illustration shows the ResourceDemandingSEFF of the service UploadFiles. It gets an array of files as input parameter and calls the external service HandleUpload within a loop for each file.
With the specified dependency to the number of elements in the input collection, the probability distribution of random variable for the number of loop iterations in the ResourceDemandingBehaviour can be determined once the number of elements are known. If the dependency had not been specified, it would not have been known from the interfaces how often the required service would have been called. Thus, with the specified PMF, a more refined prediction can be made for varying usage contexts.