Running the JavaToJSON Process

Run the JavaToJSON process to convert Java object to JSON.

Prerequisites

Ensure that you have imported the process, as described in Importing the JavaToJSON Process.

Procedure

  1. In the Project Explorer view, expand GSON-Sample > Processes > test > JavaToJSON.bwp.
  2. In the process editor, double-click the JavaToJson activity, enter the following parameters:
    1. Click the General tab, click to create or choose a shared resource.
    2. Click the Input tab, enter a value in the required address field.
      You can also enter other optional values in other fields.
  3. On the toolbar, click to save your configurations.
  4. From the menu, click Run > Debug Configurations.
  5. In the "Create, manage, and run configurations" dialog, click BusinessWorks Application > BWApplication in the left panel, and then select GSON-Sample.application in the Applications tab in the right panel.
  6. Click Debug to start the test process.

Result

In the Debug perspective, click the BusinessWorks Jobs tab, and then click test.JavaToJSON > JavaToJSON. Click the Output tab in the Job Data view. The output is displayed in the Output tab.