Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Now that our Mashup's Layout and Widgets have been set, we need to bring in backend data and tie it to those Widgets for display.
We'll make use of Mashup Data Services for this. The first one we'll add will be UserManagementSubsystem > GetUserCount.
You're not limited to only pulling information from one Mashup Data Service.
We already have User Management's GetUserCount. We'll now also bring in information from the Licensing Subsystem.
With our backend data now accessible, let's bind it to our Widgets for display.
If we were to click View Mashup now, we would see the User Count and Licensing info displayed in the Mashup's Widgets. However, it would never update unless we manually refreshed the page.
To automate that process, we'll use the Auto Refresh Widget.
We have now created a Minimum Viable Product (MVP) of a "licensing dashboard" to ease our administration work.
This dashboard could still be improved. For instance, a Mashup Function could be created which automatically recalculates the value from GetUserCount to more accurately match GetCurrentLicenseInfo. This can be accomplished via the Mashup Builder's bottom-right Functions tab. Or, you could even add a separate Text Field Widget to to the top section and directly access the remaining license time via the LicensingSubsystem > GetDaysRemainingInLicense Service.
Whatever you choose to do to improve the Mashup is up to you.
However, what should be done when a license is nearing its expiration? To resolve this issue, we need to replace the existing license via the AcquireLicense Service.
After acquiring your new license, you should immediately return to the LicensingSubsystem and consult the GetCurrentLicenseInfo Service to confirm that Thing, User, expiration-date, and other issues are accurate.
If anything goes wrong with the new license transfer, you can simply replace the original license_capability_response.bin file and re-run AcquireLicense to return to your old one. Once again, it is import to perform these steps well before your expiration occurs.
Foundation checks for a valid license periodically. If this happens while you have an invalid license_capability_response.bin file in-place, you will no longer be able to access the Foundation GUI.
Fortunately, these issues are self-correcting if a valid license_capability_response.bin is placed in the correct location, as these periodic checks will also pick up a valid license_capability_response.bin file automatically, even after the system has locked you out.
You should also be able to trigger an AcquireLicense action via a REST call even if the GUI is unavailable.
Congratulations! You've successfully completed the Manage Licensing with Foundation Subsystems guide.
In this guide, you learned how to:
If you have questions, issues, or need additional information, refer to:
Resource Link
Community | Developer Community Forum |
Support | Foundation Help Center |