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 Know-how Package and the Know-how Component

First create the package and the component to store your app.

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

Create the Custom App

It is now time for you to create your app.

  1. In the Types and processes section of the action bar , click Create Type .
  2. In the Create Type, 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 in the Operation section from the action bar .
  5. Double-click the Simple Interaction operation and enter Hello World in the Message field.
  6. Click OK and save the component.
  7. In the Apps and Commands section of the action bar , click Create a App in Apps List .
    The App Definition dialog box appears.
  8. Enter the custom app title in the Default Title box, Hello World in our example.
  9. Select Product in the Context list and click OK.
  10. 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 Title box.
  11. Click OK.
  12. 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.
  13. Double-click the app you created and click Install For Test.
  14. Click OK.

Associate an Icon with the Custom App

Now associate an icon with your custom app. This icon can displayed in the action bar of your app.

  1. Double-click the Know-how Apps resource located attached to the Know-how component.
    You switch in the Know-how Apps Resources app.
  2. If not done, import your icon in the OS-Independant_RunTimeView, resources, graphics, and icons.
  3. Expand the OS-Independant_RunTimeView node and double-click the msgcatalog node.
  4. Double-click the CATRsc file to add the icon name.
    Note: The icon can 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";
  5. Save the resource and switch back to the Know-how Apps component.
  6. Double-click the app you created.
  7. Click Install for Test and, Click OK.
    The app is now available from the Compass.
  8. Save the Know-how Apps component and close it.

    Note: After an Install for Test, the icon can taken into the account after a new start of the session.

Publish the Custom App

Before the user can use your custom app, you must first associate the package containing the app with a collaborative space in Data Setup.

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

Result: Your app is ready to be deployed.

Use the App

Now deploy the custom 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. Restart your session.
  6. From the Compass, select the Hello World app.
  7. From the action bar, Click the icon associated with your command and click the root product to type the product.
  8. To start the sequence to display the "Hello, World!" message:    
    1. Either, Click on the command directly from the custom section of the action bar.
    2. Either, Click on the type, then select a node in the tree (depending on the context you choose in the custom app definition) then right-click that node and run the main sequences from the menu.

      Important: If later there are changes required in the resources to your app (icon app, icon on commands, CATNIs of dialogs)., once you updated your changes in the Know-how Apps Resources, you can must increase the version number of the package containing your app to make sure your cache gets updated on next restart. For that you can do the following:
      • Search and open the package (Know-how Apps Creation starts)
      • Right-click on it > Options.
      • Increase the version number.
      • Save the package
      • Restart.
      • On the next restart, Click Yes on the prompt asking if you want to refresh the package.