Asset Performance Suite Connector

Content Type: Module
Categories: Connectors

Overview

The Asset Performance Suite Connector enables Mendix applications to connect to the Asset Performance Suite (APS) from Siemens.

Documentation

Description

The Asset Performance Suite Connector enables Mendix applications to connect to the Asset Performance Suite (APS) from Siemens.

Typical usage scenario

This module is intended for the following scenarios:

  • If you need a user interface to display data from APS and the built-in UI of APS is not suitable for your use case, you can create your own UI using Mendix and this APS Connector module.
  • If you have an existing Mendix app and would like to incorporate data from APS, you can do so by adding this APS Connector module to your app.

Features and limitations

This module provides:

  • Integration with APS user management for authentication and authorization
  • Mendix domain model for general APS entities (such as assets, parameters, signals, events)
  • Microflows for retrieving data from APS via its API
  • UI snippets for navigating the asset hierarchy and displaying information about assets and their parameters, signals etc.

Dependencies

This module requires Mendix Studio Pro version 9.3.0 or higher.

Installation

After adding this module to your app, switch to the Errors tab (usually in the bottom part of the main window) to check for the following issues:

  • If you see the error message Design properties have been renamed in your theme and need to be updated, then right-click this message and choose Update all renamed design properties in project.
  • If you see the error message The definition of this widget has changed. Update this widget..., then double-click this message to open the page where the widget is used. Right-click on the highlighted widget on the page and choose Update all widgets.

Configuration

Initial Configuration

Configure "after startup" microflow
  1. In the App Explorer panel within Mendix Studio Pro, expand the topmost node (labeled "App ...") and double-click the Settings node below it.
  2. In the App Settings window, switch to the Runtime tab.
  3. Click the Select... button next to the After startup box.
  4. Expand Asset_Performance_Suite_Connector, expand USE_ME, expand After_Startup, select AS_Initialize_APS_Connector, then click Select.
  5. Click OK.
Set configuration parameters
  1. In the App Explorer panel, expand Asset_Performance_Suite_Connector, then expand USE_ME.
  2. Double-click APS_Base_URL. Replace the content of the Default value field with the base URL of the APS instance that you want to connect to (including the trailing slash), then click OK.
  3. Double-click APS_Client_ID. Replace the content of the Default value field with the client ID to be used for authenticating to APS, then click OK.
  4. Double-click APS_Client_Secret. Replace the content of the Default value field with the client secret to be used for authenticating to APS, then click OK.
Configure security and user roles
  1. Double-click the Security node below the topmost node in the App Explorer.
  2. If the security level is off, change it to prototype / demo (or to production, depending on your requirements).
  3. Switch to the User roles tab and click New.
  4. For the name, enter Anonymous.
  5. Click Select / deselect all so that the checkboxes for all the modules are unchecked.
  6. Click OK.
  7. Double-click the newly added Anonymous entry in the list of user roles.
  8. Click the Edit button next to Module roles.
  9. Check the box next to Anonymous below Asset_Performance_Suite_Connector, then click OK and OK again.
  10. Double-click the User entry in the list of user roles.
  11. Click the Edit button next to Module roles.
  12. Check the box next to User below Asset_Performance_Suite_Connector, then click OK and OK again.
  13. On the Anonymous users tab, change the setting for Allow anonymous users to Yes.
  14. For the Anonymous user role, select Anonymous, then click OK.
Configure login via APS
  1. Double-click the Navigation node below the topmost node in the App Explorer.
  2. Click the Edit... button next to Role-based home pages.
  3. Click New, select the Anonymous user role and click Select.
  4. Click Select Target.
  5. Expand Asset_Performance_Suite_Connector, expand USE_ME, expand Authorization, select RedirectToLogin and click Select, then click OK.

Asset Navigation

Create asset page
  1. Expand Asset_Performance_Suite_Connector, expand USE_ME, expand User_Interface, expand Templates, select (GenericAssetPage) and press Ctrl+C (or choose Copy from the context menu).
  2. Right-click on your module (e.g. "MyFirstModule") and choose Add folder.... Enter Asset_Page and click OK.
  3. Select the Asset_Page folder and press Ctrl+V (or choose Paste from the context menu).
  4. Right-click on (GenericAssetPage) (within the Asset_Page folder) and choose Include in project.
  5. Switch to the Errors tab (usually in the bottom part of the main window).
  6. If you see the error message The selected layout 'Atlas_UI_Resources.Atlas_Default' no longer exists., then double-click this message and switch to the Properties tab (usually on the right side of the main window).
  7. In the table within the Properties tab, click on the row labeled Layout, then choose Atlas_Default (Atlas_Core) from the drop-down list.
  8. If you see the error message Please re-select allowed roles., then double-click this message and switch to the Properties tab.
  9. In the table within the Properties tab, click on the row labeled Visible for, then click on the button marked with three dots (...) and click OK.
  10. Expand Asset_Performance_Suite_Connector, expand USE_ME, expand User_Interface, expand Templates, select (HandleNavigation) and press Ctrl+C (or choose Copy from the context menu).
  11. Expand your module, select the Asset_Page folder and press Ctrl+V (or choose Paste from the context menu).
  12. Right-click on (HandleNavigation) (within the Asset_Page folder) and choose Include in project.
  13. Switch to the Errors tab.
  14. If you see the error message The selected page 'Asset_Performance_Suite_Connector.GenericAssetPage' no longer exists., then double-click this message and switch to the Properties tab.
  15. In the table within the Properties tab, click on the row labeled Action, then click on the button marked with three dots (...).
  16. If the Select Type of Action window appears, expand Client, select Show page and click Select.
  17. In the Show Page window, click the Select... button next to the Page field.
  18. Expand your module, expand the Asset_Page folder, select GenericAssetPage and click Select, then click OK.
  19. Repeat the last four steps for each occurrence of the error message mentioned above.
  20. If you see the error message Please re-select allowed roles., then double-click this message and switch to the Properties tab.
  21. In the table within the Properties tab, click on the row labeled Allowed roles, then click on the button marked with three dots (...) and click OK.
  22. Double-click the Domain Model node within your module in the App Explorer.
  23. Right-click anywhere in the Domain Model tab and choose Add entity.
  24. Double-click the newly created entity (blue box labeled Entity).
  25. Enter a name, for example CustomNavigationContext.
  26. Click the Select... button next to Generalization.
  27. Expand Asset_Performance_Suite_Connector and select NavigationContext, then click Select.
  28. Switch to the Event handlers tab and click New.
  29. For Moment, select After.
  30. For Event, select Commit.
  31. For Pass event object, select Yes.
  32. Click the Select... button next to Microflow.
  33. Expand your module, expand and the Asset_Page folder, then select HandleNavigation and click Select.
  34. Click OK, then click OK again.
  35. Expand Asset_Performance_Suite_Connector, expand USE_ME, expand User_Interface, expand Templates, select (ShowRootAssetPage) and press Ctrl+C (or choose Copy from the context menu).
  36. Expand your module, select the Asset_Page folder and press Ctrl+V (or choose Paste from the context menu).
  37. Right-click on (ShowRootAssetPage) (within the Asset_Page folder) and choose Include in project.
  38. If you see the error message The selected page 'Asset_Performance_Suite_Connector.GenericAssetPage' no longer exists., then double-click this message and switch to the Properties tab.
  39. In the table within the Properties tab, click on the row labeled Action, then click on the button marked with three dots (...).
  40. If the Select Type of Action window appears, expand Client, select Show page and click Select.
  41. In the Show Page window, click the Select... button next to the Page field.
  42. Expand your module, expand the Asset_Page folder, select GenericAssetPage and click Select, then click OK.
  43. Double-click the Navigation node below the topmost node in the App Explorer.
  44. In the Menu section within the Navigation tab, click New item.
  45. Enter a caption (for example Asset Explorer).
  46. Select Call a microflow from the drop-down box labeled On click.
  47. Expand your module, expand the Asset_Page folder, select ShowRootAssetPage and click Select.
  48. Click OK.
  49. Right-click on the newly added entry in the Menu section and choose Go to target (MyFirstModule.ShowRootAssetPage).
  50. Double-click the activity (blue rectangle) labeled Create NavigationContext.
  51. Click the Select button next to the Entity field.
  52. Expand your module, select the entity that you created in an earlier step (CustomNavigationContext or the name you chose) and click Select.
  53. Click OK.
  54. Click anywhere on the white background of the ShowRootAssetPage microflow to clear the selection.
  55. Switch to the Properties tab.
  56. In the table within the Properties tab, click on the row labeled Allowed roles, then click on the button marked with three dots (...).
  57. Check the box next to User and click OK.
Customize asset page

The following steps show an example for customizing the asset page by adding a pop-up window that displays a trend chart when the user clicks on a signal.

  1. In the App Explorer, expand your module, right-click on the Asset_Page folder and choose Add page...
  2. Enter a name for the page, for example SignalChartPopup.
  3. For Navigation layout, choose PopupLayout (Atlas_Core) from the drop-down box.
  4. Select Blank on the left side, click on Blank Page Template and click OK.
  5. Switch to the Properties tab (usually on the right side of the main window).
  6. In the table within the Properties tab, click on the row labeled Visible for, then click on the button marked with three dots (...).
  7. Check the box next to User and click OK.
  8. Switch to the Toolbox tab (usually on the right side of the main window).
  9. Drag the Data view widget onto the page, placing it within the layout grid (the frame labeled Manual - 12).
  10. Double-click the newly added data view (blue frame labeled [Unknown]).
  11. In the Data source section, select the Context option.
  12. Click the Select... button next to the Entity (path) field.
  13. Expand Asset_Performance_Suite_Connector and select Signal, then click Select.
  14. Click OK.
  15. If the question Do you want to automatically fill the contents of the data view? appears, click No.
  16. In the Toolbox tab, drag the Snippet call widget onto the page, placing it within the data view, directly below the light blue bar labeled [Signal, page parameter].
  17. In the Select snippet window, expand Asset_Performance_Suite_Connector, expand USE_ME, expand User_Interface, expand Snippets, select TimeSeriesChart and click Select.
  18. In the App Explorer, expand your module, expand Asset_Page and double-click on GenericAssetPage.
  19. Scroll down to the bottom of the GenericAssetPage to find the Signals box.
  20. Within the Signals box, right-click on the blue frame labeled [Asset_Performance_Suite_Connector.AssetSignals] and choose Inline snippet.
  21. Double-click on the dotted rectangle directly below the AutoLoadMore widget.
  22. In the Edit Container window, click on the drop-down box labeled On click and choose Show a page.
  23. Expand your module, expand Asset_Page, select the page that you created in an earlier step (SignalChartPopup or the name you chose) and click Select.
  24. Click OK.

 

Releases

Version: 1.0.0
Framework Version: 9.3.0
Release Notes: Initial release