Apama Analytics Builder 10.6 | Using Apama Analytics Builder for Cumulocity IoT | Using the Model Editor | Working with blocks and wires | Replacing devices, device groups and assets
 
Replacing devices, device groups and assets
You can search the input and output blocks for the devices, device groups and assets that are used in the current model and replace them with other devices, device groups or (if the search box is used) assets that are currently registered in the Cumulocity IoT inventory (visualized in the Device Management application).
Note:
In the rules below, the term device refers to a device or other asset (but not to a device group).
The following rules apply:
*You can replace a device with another device.
*You can replace a device group with another device group.
*When you replace a device with a device group:
*all matching input devices are changed to device groups, and
*all matching output devices are changed to trigger devices.
*When you replace a device group with a device:
*a device group is changed to a device, and
*all matching trigger devices are changed to the specified device.
Note:
If you change more than one device group to a device at a time, then only the first specified device will be used to replace all trigger devices.
*An entry named Trigger Device is not available for selection in the dialog.
After you have replaced the devices, you need to verify that the measurements that are used by the input and output blocks of the current model still refer to the appropriate measurements. The Cumulocity IoT fragment and series are not changed by the replacement, which may or may not apply to the newly defined device.
*To replace devices, device groups and assets
1. In the toolbar of the model editor, click . This toolbar button is only enabled when at least one device, device group or asset has been defined in the current model. Any defined trigger devices are not considered in this case.
2. In the Current device and device group drop-down list box of the resulting dialog box, select the device, device group or asset that you want to replace. All devices, device groups and assets that are used in the model are available for selection.
3. Click the Replace with box to display a dialog box. The dialog box is the same as when selecting a different device, device group or asset in the block parameter editor. See Editing the parameters of a block for more information on this dialog box. Click the Use button (this is shown when you move the mouse over an entry) to select the device, device group or (if the search box is used) asset that you want to use instead.
The maximum number of shown devices, device groups and/or assets depends on a tenant option. For more information, see Configuring the number of shown devices, device groups and/or assets.
The assets that are shown when searching also depend on a tenant option. You can restrict the search to show only assets of a specific type. For more information, see Searching for input and output assets.
4. If you want to replace further devices, device groups or assets, click Add row. This is only shown if more than one device, device group or asset has been defined in the current model.
A new row is shown, containing additional Current device and device group and Replace with drop-down list boxes, and you can now select one more device, device group or asset to be replaced. Any devices, device groups and asset that you have previously selected for replacement are no longer offered for selection in the Current device and device group drop-down list box.
Repeat this step until all required devices, device groups and assets have been selected for replacement. You can add as many rows as there are devices, device groups or assets in the current model.
5. If you want to remove a row (for example, when you no longer want to replace a selected device), click next to that row. This is only available if the dialog box currently shows more than one row.
6. Click Replace.