Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
This project will introduce how to get your application ready for usage by actual users or ready to collect data.
Following the steps in this guide, you will be ready to present your finished application to users so they can benefit from its functionality. Deploying your application provides the ability for users to access it from anywhere, anytime and enables your edge devices to communicate with your application 24/7.
We will teach you how to deploy your ThingWorx IoT application to be ready for whatever experience you've molded it to be.
NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes
Download the CompletedApplication.xml attached to this guide. Within the downloaded file, you will find Entities referenced in this lesson, including a finished application that will be used for the deployment exercise. Import and utilize this file to see a finished example and return to it as a reference if you become stuck during this guide and need some extra help or clarification.
Keep in mind, this download uses the exact names for entities used in this tutorial. If you would like to import this example and also create entities on your own, change the names of the entities you create.
In order to control access to your application, you first need to create an Organization. Think of the organization entity as your company or department. Once you define the organization, you will create Users and User Groups.
Organizations are hierarchical structures that allow you to assign visibility to entities in the ThingWorx Model. You can add users and group to each level within this structure.
This is the organization defined within the sample application download for this guide.
Constructors | Organization | High level of an organization. |
UpperManagement | User Group | Executives in the organization. |
HR | User Group | HR department in the organization. |
Management | User Group | First and second tier management in the company. |
Laborers | User Group | Skilled trade workers in the organization. |
ConstructorsGroup | User Group | Security group for all employees in the company. |
j.general | User | HR Department Employee |
a.jones | User | Skilled Laborer |
j.lewis | User | Manager |
i.jorden | User | CEO |
default_user | User | User used in trial version for all company roles. |
Follow the steps below to create an Organization and make it login ready. Once your Organization is saved, you are provided with a login screen. Customize the login page to your liking with the General Information tab of the Organization after creating it.
From the Home page of Composer, filter for and select the Constructors Organization. The General Information tab shows the configurations for the login screen and resetting passwords. For more information on password resets, see the Password Reset Help Page.
The Login Style and Login Button Style are Style Definition properties.
NOTE: If you keep these fields blank, the default configurations will be applied. You can create your own Style Definitions by following steps in our Styles and States Guide.
Let's create the structors for our Organization. With the Constructors Organization open, follow the directions below:
Repeat the steps to create the full hierarchy of the organization and its members.
Visibility is a simple form of access control. If an entity is visible to members of an organizational unit, then its members have access to the entity.
By Default, new Users have no permission configurations. Permissions can be defined for any Entity created on the ThingWorx platform. All Entities have permission control for both design time and run time.
Design time is the period in which changes can be made to the Entity in Composer. Run time is the period in which the application is running and calls are made.
Permissions should be set for each and every Entity within the application in order to keep it secure and maintain access to services.
The Inherit category allows a user to inherit permissions from the user group it belongs to.
ThingWorx Composer is set up to allow deployment in very simple steps. An application can run locally on a computer or remotely on a server as long as an Apache Tomcat server is installed on the same machine. Simply copy the URL that is generated when you click View Mashup within Composer. That is the URL to share with users so they can access your application.
If you plan to use a Login Screen, use the View Mashup URL generated from the Login Mashup you create. To view the login page of your application, type the following URL: [server]/Thingworx/FormLogin/ (ie, localhost/Thingworx/FormLogin/Constructors).
The login page for the sample application can be found at: [server]/Thingworx/FormLogin/Constructors.
To log in using this screen, type in the username and password of a user that is in the organization.
To use one of the example Users, set their password in the Composer and test it within the login prompt. Based on the permissions you set, users will have a different view of the application when they log in.
There are two mechanisms that enable you a view into your application and what is happening behind-the-scenes, through the ThingWorx Composer Monitoring and the ThingWorx filesystem.
ThingWorx provides pages to see all logs and communications between your ThingWorx instance, your applications, and edge devices using the Monitoring drop-down in the top navigation toolbar of your Composer. To see this page click Monitoring on the left menu, then select the option you would like to see.
Resource Usage
Application Log | This page will show you the log for your application and information on the processing running. |
Communication Log | This page is used to show communication between your ThingWorx instance and outside sources. |
Configuration Log | This page provides information into what is happening behind the scenes for your ThingWorx Composer and how it has been configured. |
Security Log | This page highlights any information around access to the application, composer, or any security updates |
Script Log | Logging information you have set for scripts running in your ThingWorx instance. |
Error Log | Details for errors within your ThingWorx instance. |
Remote Things | This page provides the list of Entities that are able to connect to edge devices, connected to your application, and even Entities that are currently disconnected. |
Log files for ThingWorx and your application can be found in the [Root]\ThingworxStorage\logs directory. The ROOT DIRECTORY is the folder in which ThingWorx has been running (ie, C:\ThingworxStorage\logs for Windows or /ThingworxStorage/logs for Mac or Linux).
Each log file corresponds to some of the content you can see in the Monitoring dropdown in the ThingWorx Composer.
Congratulations you have completed the Deploy an Application How-To, and learned how to:
The next guide in the Customize UI and Display Options to Deploy Applications learning path is How to Display Data in Charts.
We recommend the following resources to continue your learning experience:
Capability Guide
Build | Implement Services, Events, and Subscriptions |
Secure | Configure Permissions |
If you have questions, issues, or need additional information, refer to:
Resource Link
Community | Developer Community Forum |
Support | Help Center |