Build it Yourself

The following steps describe how to import the provided job into WebSphere DataStage, create the information service using Information Services Director, and how to build the business process.

 

Import the job into WebSphere DataStage and QualityStage Designer

  1. From the download section, download and save the provided LogAnalyzer.dsx file and the nightly.log file to a temporary
    directory, for example, C:\temp.
  2. In WebSphere DataStage and QualityStage Designer, select Import > DataStage Components.
  3. Enter the path to the LogAnalyzer.dsx file and click OK. The imported job appears in the Repository tree.



  4. Double click the LogAnalyzer job.The job design is opened.
  5. From the menu, select File > Generate Report and click OK.
  6. In the information dialog click OK.
  7. From the menu, select File > Compile. The job should compile without any errors.



  8. Click Close.
  9. The job reads the file nightly.log from location C:\temp. If you've stored the file in a different location,
    you need to adapt the NightlyLog stage of the job to reflect the different location and recompile the job.

Create the information service using Information Services Director

Verify the connection to the DataStage server

  1. Open the IBM Information Server console (user must have IS Admin privileges).
  2. From the HOME pillar (blue sphere on the top left), expand the Configuration section and select Information Services Connections as shown below.



  3. Expand the Select an Information Services Connection to Work With section.
  4. Verify that the DSServer connection is enabled (has a check mark in the Enabled column).



    If the DSServer connection does not have a check mark, follow these steps:
    1. Double-click DSServer.
    2. Press the Edit button on the bottom right. A Save & Enable button appears.
    3. Enter the user name and password of your DataStage host.
    4. Click the Test button to validate the connection.
    5. If the connection was validated successfully, click Save & Enable.
    6. Press the Edit button again (to leave the edit mode). The Save & Enable button disappears.
    7. Verify that the DSServer connection now has a check mark as shown above.

Create a new Project

  1. From the Home pillar, select My Home.
  2. Select the menu File and then select New Project....
  3. Select Information Services for type and enter a project name, for example, ISProject.



Create a new information service

  1. From the DEVELOP pillar, select Information Services Application.



  2. Expand the Select Information Services Application to Work With section and select New from the task list on the right.
  3. Specify an application name, for example, LogAnalyzerApp.
  4. Click Save Application on the bottom right. An Edit button appears.
  5. In order to switch to the edit mode, click the Edit button. (The button should remain pressed).
  6. Select New > Service on the bottom left.
  7. Specify a Service Name, for example, LogAnalyzerService and a description, for example, "provides operations selecting specific messages from log files".
  8. Click Save Applications.
  9. Expand the Operations view and double-click the newOperation1 operation.
  10. Change the operation name to a descriptive name, for example, getExceptions and click Save Application.
  11. Click Select to select an information provider.
  12. Select the DataStage and QualityStage type. Your DSServer provider appears in the Select a DataStage Job view.
  13. Expand your DataStage project and select the LogAnalyzer job.



  14. Click OK.
  15. Specify an operation description, for example, "returns all exception messages of the log file".
  16. Select the Outputs tab and check both Group Arguments into Structure and Return Array.



  17. Click Save Applications.
  18. Click the Bindings tab.
  19. In the bottom right corner select Attach Bindings > SOAP Over HTTP.
  20. Click Save Applications.
  21. Click the Edit button to leave the edit mode. (The button should be released now).
  22. Expand the Select Information Services Application to Work With section, select LogAnalyzerApp, and click Deploy.



  23. Click Deploy again to deploy the application. Wait until the progress bar on the bottom disappears. The application deployment status changes to Deployed.

Build the business process using WebSphere Integration Developer

Create the module

  1. Open WebSphere Integration Developer
  2. From the menu, select File > New > Module.
  3. Enter the module name, for example, LogAnalyzer and click Finish.



Discover external Information Server service

  1. Open the Assembly editor by double-clicking on Assembly Diagram.
  2. From the menu, select File > New > External Service.
  3. Select Registries and Information Server services and click Next.



  4. Select Information Server and and click Next.
  5. Enter Host name, User, Password, set HTTP port to correct value and click Next.



  6. When the External Services dialog box has opened, search for available objects by clicking on the Run Query button. After the
    query result has been displayed, open the LogAnalyzerApp and open the LogAnalyzerService and select the getExceptions operation.



  7. Click the Details button to get additional information about the service, the operation, and the underlying DataStage job.



  8. Close the Operation Details.
  9. Add LogAnalyzerService to the Selected objects box by selecting it and clicking ('>').



  10. Then click Next.
  11. The Service Location Properties dialog appears. Set or ensure respectively that the checkboxes are set
    as shown.



    Click Finish to complete the 'External Service' creation. The LogAnalyzerService will now appear in the Assembly Diagram.
  12. Press Ctrl+s to save your changes or click Save on the toolbar.

Prepare the process

  1. Right-click the new LogAnalyzer module and select New > Business Process.
  2. Enter the process name LogAnalyzerProcess and click Next.
  3. Select Long-running process and click Finish.



  4. Select the variable input1, in the properties view select the Description tab, and change the name to, for example, StringVar.



  5. From the palette, select Parallel Activities and add it to the process as shown below.



Add the Information Service invocation

  1. Add a Reference Partner (), by clicking the .
  2. Select the new partner, in the properties view select the Description tab, and enter
    a display name, for example, LogAnalyzerServicePartner.
  3. Click the Browse button and the Interface Selection dialog opens.
  4. Select the LogAnalyzerService interface of the Information Server service and click OK.



  5. From the palette, select Invoke and add it to the process as shown below.



  6. Select the Invoke activity, in the properties view select the Description tab, and enter a display name, for example, LogAnalyzerService.
  7. Click the Browse button and the Partner Selection dialog opens. Select the partner LogAnalyzerServicePartner and click OK.



  8. Click on (none) to create the 'getExceptions' output variable. A rectangle window opens. Select New... and enter the
    variable name, for example, LogExceptions



    and press OK to close the 'New Variable' dialog. The new variable will be set as output variable.

Extraction of In-lined Business Objects into separate XSDs

Since in-lined Business Objects cannot be used in interfaces, we have to extract these Business Objects from the WSDL into separate XSD files:
  1. Open the Data Types in the Business Integration view.
  2. Right-click one of the data types and select Refactor and then Extract In-lined Business Objects.



  3. The 'Extract' dialog opens. Press OK to start extraction.
    After completion, the icon in front of the XSD types will change from '' to ''

Add the Human Task activity

  1. In the Business Integration view, right-click Interfaces and select New > Interface. This will open the Interface editor.
  2. Enter an interface name, for example, LogExceptionTask and click Finish.
  3. Click the Add Request Response Operation button (), click the string input1 and select ArrayOf_tns1_nillable_LogAnalyzerServiceOutVar1 from the list of available types.
    Then press Ctrl+s to save your changes or click Save on the toolbar.




  4. From the palette, select Human Task and add it to the process as shown below.



  5. In the Interface Selection window, select the LogExceptionTask interface and click OK. The Human Task editor opens.
  6. Leave the opened task editor untouched and switch back to your process.
  7. Select the Human Task activity, in the properties view select the Description tab, and enter a display name, for example, handleExceptions.
  8. Back in the Details tab of the task, map the input to the LogExceptions variable and the output to the StringVar variable as shown below.




  9. Right-click the LogAnalyzer activity, select Add Link and click the handleExceptions (human task) activity.
  10. Click the new link, set the expression language to Java and the expression type to Java.
  11. Enter this line in the expression field:
    return LogExceptions.getList( "LogAnalyzerServiceOutVar1" ).size() > 0;



  12. To save your changes, enter Ctrl+s or click Save on the toolbar.

Add the process to the module assembly

  1. In the Business Integration view select Assembly Diagram.
  2. Drag the LogAnalyzerProcess process to the Assembly Diagram.



  3. Right-click the and select Wire to existing.



  4. To save your changes, enter Ctrl+s or click Save on the toolbar.

Export the process application (Optional)

To create an installable application, complete the following steps.
Note: Exporting the process application as an EAR file is required only if you want to install the process not via WebSphere Integration Developer but via the Administrative Console or scripting.

  1. Switch to the Business Integration view.
  2. In the navigation tree, right-click the LogAnalyzer module.
  3. From the pop-up menu, select Export.
  4. In the Export window, click EAR file.



  5. Click Next.
  6. In the EAR project list of the EAR Export window, click LogAnalyzerApp.
  7. In the Destination list, specify your destination directory.
  8. Click Finish.