? 第一部分:安装ThingWorx 1. Task 1. Install the Java Development Kit.
1. Double-click jdk-8u40-windows-x64 in Windows Explorer. 2. Click Next >. 3. Click Next >. 4. Click Next >. 5. Click Close.
2. Task 2. Install Apache Tomcat.
1. Double-click apache-tomcat-8.0.20 in Windows Explorer. 2. Click Next >. 3. Click I Agree. 4. Click Next >.
5. Type 80 in the HTTP/1.1 Connector Port field to overwrite the default. 6. Type admin in the User Name field. 7. Type admin in the Password field. 8. Click Next >. 9. Click Next >.
10. Type C:\\PTC\\Tomcat in the Destination Folder field to overwrite the default contents. 11. Click Install.
12. Clear the Run Apache Tomcat check box. 13. Clear the Show Readme check box. 14. Click the Finish button.
3. Task 3. Configure server.xml.
1. Navigate to C:\\ptc\\Tomcat\\conf in Windows Explorer. 2. Right-click the server.xml file. 3. Select Send to. 4. Select NoteTab Light.
5. Select Search from the NoteTab Light menu. 6. Select Replace.
7. Type protocol=\ in the Find what field.
8. Type protocol=\ in the Replace with field. 9. Click the Replace All button. 10. Click the OK button. 11. Click the Save Document
icon in NoteTab Light.
12. Click the Close icon in NoteTab Light.
4. Task 4. Configure Tomcat settings.
1. Click the Windows Start 2. Select All Programs.
icon on the Windows taskbar.
3. Select Apache Tomcat 8.0 Tomcat8. 4. Select Configure Tomcat.
5. Click the Startup type drop-down list to expand it. 6. Select Automatic. 7. Select the Java tab.
8. Copy the following four lines to the end of the Java Options section to append the current
contents:-XX:+UseNUMA-XX:+UseConcMarkSweepGC-XX:PermSize=128m-XX:MaxPermSize=1024m
?
Depending on your system and data needs for the ThingWorx Composer, you may want to set the MaxPermSize larger than 1024 MB.
9. Clear all of the content in the Initial memory pool field. 10. Clear all of the content in the Maximum memory pool field. 11. Click the Apply button. 12. Select the General tab.
13. Click the Start button to start Tomcat.
5. Task 5. Install the ThingWorx Composer Web application.
1. Select New Tab - Google Chrome on the Windows taskbar. 2. Type http://localhost in the address bar and press ENTER. 3. Click the Manager App button. 4. Type admin in the User Name field.
5. Type admin in the Password field and press ENTER.
6. Click the Choose File button in the WAR file to deploy section of the user interface. 7. Double-click D:\\Student\\ThingWorx\\LabFiles\\Thingworx.war. 8. Click the Deploy button and wait for the browser page to refresh.
6. Task 6. Open the ThingWorx Composer.
1. Click /Thingworx in the Applications section of the Tomcat Web Application Manger.
?
If you want to complete the MySQL database integration exercises in this course, you must either use a PTC University cloud-based virtual machine or install MySQL and the sample data. MySQL, along with installation instructions, is available as part of the lab files package. However, we are using a PTC University cloud-based virtual machine, so MySQL is preinstalled.
2. Type Administrator in the User Name field.
3. Type admin in the Password field and press ENTER. 4. Click the I accept button.
? 第二部分:开始使用ThingWorx
2.1、Creating a User Login
Task 1. Create a user login.
1. Click Expand 2. Select Users.
3. Click in the spotlight search field to select it.
to expand Security in the Explorer.
4. Type + to list objects you can create in ThingWorx.
5. Type U to list objects you can create in ThingWorx that start with the letter U. 6. Select +User.
7. Type ThingWorxStudent in the Name field. 8. Type Student User in the Description field. 9. Click the Change Password button. 10. Type ptc in the Enter New Password field. 11. Type ptc in the Retype Password field. 12. Click the Change Password button.
13. Click the User Extensions link in the ENTITY INFORMATION section of the Explorer.
14. Type the e-mail address that corresponds to your SMS text messaging number in the smsAddress field.
o In a future exercise, a text message will be sent to this user. For the upcoming exercise to work, the valid e-mail address that corresponds to your SMS text messaging number must be set. For more information on how to determine the correct e-mail address to use for this purpose, visit http://sms411.net/how-to-send-email-to-a-phone/. 15. Type a valid e-mail address in the emailAddress field. 16. Click the Save button. 2.2、Adding a User to a Group Task 1. Add the ThingWorxStudent user to the Administrators group.
1. Type Ad in the spotlight search field to locate all objects with names that begin with Ad. 2. Select the Administrators group. 3. Click the Cancel Edit (View) button. 4. Click the Edit Members button.
5. Select ThingWorxStudent in the left panel. 6. Drag ThingWorxStudent into the right panel. 7. Click the Save button.
8. Select Members in the Explorer.
2.3、Importing Entities, Mashups, and Data
1. Task 1. Import entities.
1. Click Import/Export in the ThingWorx header to expand a drop-down list. 2. Select From File.
3. Verify that the Entities radio button and the Single File tab are selected. Then, select the Use Default Persistence Provider check
box.
4. Click the Choose File button.
5. Select D:\\Student\\ThingWorx\\LabFiles\\ThingWorxFundamentalsPreloadEntities.xml. 6. Click the Open button. 7. Click the Import button.
2. Task 2. Import data.
1. Wait for the Import Successful message and then select the Data radio button.
2. Click the Choose File button.
3. Select D:\\Student\\ThingWorx\\LabFiles\\ThingWorxFundamentalsPreloadData.json. 4. Click the Open button. 5. Click the Import button.
2.4、 Viewing Imported Content
Task 1. View imported content.
1. Click Mashups in the ThingWorx Explorer.
2. Click under the scroll bar to scroll down to VendingMain. 3. Click the VendingMain link. 4. Click the Info button.
5. Click the View Mashup button.
6. Click the Pop-ups were blocked on this page. 7. Select Always allow pop-ups from localhost. 8. Click the Done button.
9. Click the View Mashup button again. 10. Click Close
to close the mashup window.
icon in the Chrome address bar.
11. Click the Mashup Preview link in the Explorer.
12. Type http://localhost/Thingworx/Mashups in the Chrome address bar. 13. Click under the scroll bar to scroll down to VendingMain. 14. Click the VendingMain link.
2.5、Importing a Widget Extension
1. Task 1. Import a widget extension.
1. Click Import/Export in the ThingWorx header to expand a drop-down list. 2. Select Import under EXTENSIONS. 3. Click the Choose File button.
4. Select D:\\Student\\ThingWorx\\LabFiles\\GoogleWidgets_ExtensionPackage.zip. 5. Click the Open button. 6. Click the Import button. 7. Click the Close button. 8. Click the Yes button.
2. Task 2. Verify the widget is viewable in the imported mashup.
1. Type V in the spotlight search field. 2. Select VendingMain.
3. Click the View Mashup button.
2.6、Adding a Model Tag Term to an Existing Vocabulary
1. Task 1. Create the ThingWorxTraining tag in the Applications vocabulary.
1. Click Model Tags in the Modeling section of the ThingWorx Explorer. 2. Click the Applications link. 3. Click the Manage Terms button.
4. Type ThingWorxTraining in the Add Term field. 5. Click the Add Term button. 6. Click the Done button.
2. Task 2. Tag the ThingWorxStudent user.
1. Type ThingWorxSt in the spotlight search field. 2. Select ThingWorxStudent. 3. Type Th in the Tags field. 4. Select ThingWorxTraining. 5. Click the Save button.
2.7、Creating a Model Tag Vocabulary with Terms
1. Task 1. Create the EquipmentTypes vocabulary.
1. Click Model Tags in the Modeling section of the ThingWorx Explorer. 2. Click the New button.
3. Type EquipmentTypes in the Name field. 4. Type Ap in the Tags field.
5. Select Applications: ThingWorxTraining. 6. Click the Save button. 7. Click the Edit button.
2. Task 2. Add terms to the vocabulary.
1. Click the Manage Terms button.
2. Type Vending Machine in the Add Term field. 3. Click Add Term.
4. Type Vending Machine Communication Server in the Add Term field. 5. Click Add Term. 6. Click the Done button.
3. Task 3. Use the REST API to view the vocabulary.
1. Navigate to http://localhost/Thingworx/ModelTags/ in Chrome. 2. Click the EquipmentTypes link. 3. Click the Vocabulary Terms link.
2.8、Creating a Thing Shape
1. Task 1. Create the VendingMachineShape thing shape.
1. Click the Thing Shapes link in the ThingWorx Explorer. 2. Click the New button.
3. Type VendingMachineShape in the Name field.
4. Type Shape for the Vending Machine in the Description field. 5. Type A in the Tags field.
6. Select Applications: ThingWorxTraining.