Creating a "Hello, World!" App

This topic provides you with a scenario showing you how to create a basic app.

The stages in this procedure are as follows:

Create the Package and the Component

You must first create the package and the component to store your app.

  1. Select Add > Content > Know-how Apps Package (standard).
    The package is created along with a component.
  2. Double-click the component in the tree.
    The Know-how Apps Components app opens.

Create the App

It is now time for you to create your app.

  1. From the Types and processes section, click Create Type .
  2. In the Create Type dialog box, enter the name of the object, HelloWorld and click OK.
  3. Double-click the HelloWorld type and, from the Operation section, click Sequence Combination to create a sequence of operations.
  4. Click Simple Interaction .
  5. Double-click the Simple Interaction operation and enter Hello World in the Message field.
  6. Click OK and save the component.
  7. From the Apps and Commands section, click Create a New App in Apps List .
    The Edit App Definition dialog box appears.
  8. Enter the app title in the Default Title box, Hello World in our example.
  9. Enter Hello_World_App in the Category identifier.
  10. Select Product in the Workshop list and click OK.
  11. Click Create a New Section in Action Bar and click an app in the tree to associate the section with an app.
    1. Enter the identifier.
    2. Enter Hello World Section in the Default Title box.
  12. Click OK.
  13. Click Create Custom Command and click a section in the tree.
    1. Enter the command identifier.
    2. Enter the command title.
    3. In the Process operation definition section, select HelloWorld from the Type Identifier list.
    4. Select Sequence from the Operation identifier list.
    5. Click OK and save.
  14. Double-click the app you created and click Toggle Exposition.
  15. Click OK.

Associate the Icon with the App

You must now associate the icon with your app. This icon will be displayed in the action bar of your app.

  1. Double-click the Know-how Apps resource located under the Resources node.
  2. Expand the OS-Independant_RunTimeView node and double-click the msgcatalog node.
  3. Double-click the CATRsc file to add the icon name.
    Note: The icon will be associated with the command.
    //   Icons for the command starter CommandDefinition1
    CustomAppDefinition1.CommandDefinition1.Icon.Normal="I_Kwe2_URL_CommentsWithPen";
    CustomAppDefinition1.CommandDefinition1.Icon.Focused="IF_CommandDefinition1";
    CustomAppDefinition1.CommandDefinition1.Icon.Pressed="IP_CommandDefinition1";
  4. Save the resource and switch back to the Know-how Apps component.
  5. Double-click the app you created.
  6. Click Toggle Exposition and click OK.
    The app is now available from the Compass.
  7. Save the Know-how Apps component and close it.

Generate the Installation Data and Associate the Know-how Apps Package with a Collaborative Space

Before the user can use your app, you must first generate the installation data and then associate the package containing the app with a collaborative space in Data Setup.

  1. Right-click the Know-how Apps package you created and select Know-how Apps Package object > Set as Current Package.
  2. Click Generate Installation Data and save the package.
  3. From the Compass, click Social and Collaborative Apps and select Data Setup.
  4. Click the Know-how Apps Packages tab.
  5. Click the package you created and drag and drop it to your collaborative space.
  6. Save your work in Data Setup.

Your app is ready to be deployed.

Use the App

You must now deploy the app on the client side.

  1. Click Me > Preferences > Knowledgeware.
  2. In the Apps Packages Deployment frame, click .
  3. In the Know-how Apps Package dialog box, select the package you want to deploy and click Install Application.
  4. Click Close and OK.
  5. From the Compass, click 3D Modeling Apps and select the Hello World app.
  6. In the New Content dialog box, select Physical Product.
  7. In the section bar, click the icon associated with your command and click the root product to type the product.
  8. Right-click the node and run the sequence to display the "Hello, World!" message.