exposing cics transactions to wle - ibm www page · lab 1 exposing cics transactions to wle the...

27
Exposing CICS Transactions to WLE Lab Exercise Author: David J Brett, Version 1.0

Upload: others

Post on 02-Apr-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

Exposing CICS Transactions to WLELab Exercise

Author: David J Brett, Version 1.0

Page 2: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5

Lab Number 1

© Copyright IBM Corporation, 2011

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Page 3: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software

Contents

1.1 Lab Setup

1.2 Create a SCA Component that interfaces to CICS Catalog Transaction

1.3 Implement the Single_Item_Inquiry_BPD in Process Designer

1.4 Testing the component in the Process Center

1.5 Summary

Contents Page 3

Page 4: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

Lab 1 Exposing CICS Transactions to WLEThe CICS Catalog application is a working COBOL application that is shipped with CICS that illustrates best practices when connecting client applications to CICS applications. In this lab we will use the CICS Catalog Application in conjunction with the CICS Transaction Gateway to demonstrate how to connect a WLE Process Application to the Catalog Application's single item Inquiry transaction using the WebSphere Process Server v7.5 environment. This lab assumes the user has some familiarity with both the IBM Integration Developer and Process Designer environments.

1.1 Lab Setup

Please refer to the information located at the following link for the CICS Catalog Manager example application setup.

http://publib.boulder.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=%2Fcom.ibm.cics.ts.exampleapplication.doc%2Ftopics%2Fdfhxa_t100.html

1.2 Create a SCA Component to interface to CICS Catalog Transaction

You will now work in WID to create a SCA component that will invoke the CICS Catalog Transaction.

__1. Open WebSphere Integration Designer

__a. In the main menu click File → New → Module

__b. Fill in New Module Information and click Finish

Lab 1 Page 7

Page 5: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__2. Configure CICS_Single_Item_Inquiry to invoke the CICS transaction

__a. In the Assembly Diagram drag the Outbound CICS Adapter onto the Assembly Diagram canvas. This will display New External Service Wizard.

__b. Select the ECIResourceAdapter (7.0.1.1). Fill in the screens as follows using the parameters for your environment (JNDI Name).

__c. On the Add, Edit, or Remove Operations screen click the Add button.

__d. On the Add Operation screen enter SingleItemInquiry in the Operation name field.

__e. Click the New button next to the Input type field

__f. On the New Business Object From External Data screen click the Browse button next to the COBOL file field. This will bring up a selection dialog where you should select the InqSingle.cpy copybook on your file system

__g. Click the Next button

__h. In the Platform drop down list select z/OS

__i. Click the Find button, highlight N01INQS, and click the Next button

__j. Click the Finish button

__k. This will bring you back to the Add Operation screen. On this screen check the Use the input type for the output check box

Page 8 Exposing CICS Transactions to WLE

Page 6: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__l. Click the Finish button.

__m. This will navigate you back to the New External Service screen. Enter DFH0XCMN in the Function name field.

__n. Click the Next button

__o. Enter SingleItemInquiry_Interface in the Name field.

__p. Uncheck the Join Transaction check box

Lab 1 Page 9

Page 7: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__q. Click the Finish button.

__r. This will place the SingleItemInquiry_Interface component on the Assembly Diagram canvas.

__s. Add a SCA Export to the Assembly Diagram with the named SingleItemInquiry_SCAExport and configure it to use the generated SingleItemInquiry_Interface.

__t. Right-click on the SingleItemInquiry_SCAExport and select the Generate Binding … → SCA Binding menu item.

__u. Wire the SingleItemInquiry_SCAExport to the SingleItemInquiry_Interface component

__v. Close and save the CICS_Single_Item_Inquiry Assembly Diagram

Page 10 Exposing CICS Transactions to WLE

Page 8: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__w. Create a new Library by selecting the File → New → Library menu item

__x. Fill in the Library Name field with the value Catalog_Library, accept the defaults and click the Finish button.

__y. Refactor (move) the generated artifacts N01INQS (Business Object), and Single_Item_Inquiry_Interface (Interface) into the Catalog_Library.

__3. Create a BPD in Process Designer

__a. Open Process Designer

__b. In the Process Apps tab click Crate New Process App on the right hand side of the screen

__c. Fill in the Create New Process App as seen below and click Create

__d. Click the Open in Designer link next to the Single_Item_Inquiry_PA (SI_INQ) Process Application

__e. On the left hand side of the screen click the “+” symbol next to Processes. Then click on Business Process Definition on the Create New menu.

__f. Enter Single_Item_Inquiry_BPD in the Name field

__g. Click Finish.

__h. At this point Process Designer will display the diagram view of the Single_Item_Inquiry_BPD.

Lab 1 Page 11

Page 9: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__i. Click the Save icon at the top of the screen

__4. Import the WLE BPD into WebSphere Integration Designer

__a. Switch back into WID and click on the Open Perspective Icon

__b. Select the Process Center perspective

__c. Fill in the appropriate connection information for your environment on the Process Center Login screen

Page 12 Exposing CICS Transactions to WLE

Page 10: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__d. Click the Login button. This will bring the Process Center Screen up inside WID and will display all of the available applications on the screen

__e. Next to the Single_Item_Inquiry_PA click on the Open in workspace link. This will present the Open Process Applications or Toolkits in WID screen.

Lab 1 Page 13

Page 11: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__f. Click OK. This action will import and create the Single_Item_Inquiry_PA module inside of WID

__g. Highlight the CICS_Single_Item_Inquiry, Catalog_Library, and cicseci7011 modules.

__h. Right click the items and select the Associate with Process Center menu item

Page 14 Exposing CICS Transactions to WLE

Page 12: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__i. The Associate with Process Center dialog will be presented. Click Finish.

__j. Associating the three artifacts with the Process Center application will move them inside the imported Single_Item_Inquiry_PA module

Lab 1 Page 15

Page 13: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__k. Highlight the Catalog_Library and display the properties

__l. In the properties dialog select Business Integration → Library Mirroring

__m. Check the Mirror the library as soon as it associated with Process Center check box

__n. Click the OK button

__o. Expand the Catalog_Library artifact tree

__p. Double-click on Dependencies

__q. In the Catalog_Library Dependencies click on the down arrow next to Sharing Across Runtime Environments

Page 16 Exposing CICS Transactions to WLE

Page 14: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__r. Select Module under Sharing Across Runtime Environments

__s. Close and save the Catalog_Library Dependencies

__t. Open the CICS_Single_Item_Inquiry Assembly Diagram

__u. Display the properties of the SingleItemInquiry_SCAExport

__v. On the Bindings tab check the Make operations visible to Process Designer check box

__w. Close and save the CICS_Single_Item_Inquiry Assembly Diagram

__x. Select Single_Item_Inquiry_PA and right-click to display the action menu.

__y. Select the Refresh and Publish menu item

Lab 1 Page 17

Page 15: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__z. Press OK on the Library Mirroring warning screen. This will generate and update all the relevant artifacts and publish them to the Process Center where they will be picked up by Process Designer

1.3 Implement the Single_Item_Inquiry_BPD in Process Designer

__1. Create the Process variables

__a. In Process Designer select the Open in Designer link next to the Single_Item_Inquiry_PA Process Application.

__b. Click on Processes and open the Single_Item_Inquiry_BPD.

Page 18 Exposing CICS Transactions to WLE

Page 16: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__c. In the Single_Item_Inquiry_BPD Designer click on the Variables tab.

__d. Click the Add Private button.

__e. Name the new private variable item_id, take the default as a string.

__f. Click the Has Default check box.

__g. Assign the default value of “10”.

__h. Add two more Private Variables named cics_input, and cics_output and make them both Variable Types N01INQS.

__i. Go back to the Diagram View by clicking the Diagram tab.

__2. Add Activities to the Diagram

__a. From the pallet on the right add two activities to the System Swim Lane. The will be named Untitled, Untitled1.

Lab 1 Page 19

Page 17: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__b. From the pallet on the right add three activities to the Participant Swim Lane. They will be named Untitled2, Untitled3, and Untitled4.

__c. From the pallet on the right add one decision activity to the Participant Swim Lane. It will be named Untitled5.

__d. Select the Sequence Flow Tool and connect the six activities starting from the starting from the Start Node, ending with the Stop Node (see below).

__e. Rename the Activities by clicking on the activity and modifying the name in the Properties tab (see below).

Page 20 Exposing CICS Transactions to WLE

Page 18: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__3. Configure Activities

__a. Right-click on the first activity (Gather Input) and select Activity Wizzard.

__b. Select Human Service.

__c. Select Create a New Service.

__d. Click Next.

Lab 1 Page 21

Page 19: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__e. Notice the input fields are set to true for both input and output. Click on both input and output of cics_input and cics_ouput to change the input and output to false.

__f. Click Finish.

__g. Right-click on the next activity ( Map Data ) and select Activity Wizard.

__h. Make it a System Service.

__i. Click Finish.

Page 22 Exposing CICS Transactions to WLE

Page 20: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__j. Right-click on the third activity ( Invoke CICS Service ) and select Activity Wizard.

__k. Make it an Advanced Integration Service.

__l. Choose Attach to Existing Service.

__m. Click Select...

__n. Choose SingleItemInquiry_Interface under Advanced Integration Service.

__o. Click Finish.

__p. Right-click on the fourth activity ( Display Response) and select Activity Wizard.

__q. Select Human Service.

__r. Select Create a New Service.

Lab 1 Page 23

Page 21: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__s. Click Finish.

__t. Right-click on the fourth activity ( Display Response) and select Activity Wizard.

__u. Select Human Service.

__v. Select Create a New Service.

__w. Click Finish.

Page 24 Exposing CICS Transactions to WLE

Page 22: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__4. Implement Services

__a. Double-click on the Gather Input activity.

__b. Double-click on the Coach or click on the Coaches tab. The default coach with one input field is displayed.

__c. Click the “X” next to Gather Input to close the Coach screen.

__d. Double-click on the Map Data Activity.

__e. Click on the Script Activity.

__f. In the bottom half of the screen click on the Implementation tab.

__g. In the Script window enter the following lines of code

Lab 1 Page 25

Page 23: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__h. Close the Map Data Activity by clicking on the “X” next to Map Data on the top of the screen.

__i. Save the changes

__j. Click on the Invoke CICS Service Acitivity

__k. Click on the Data Mapping tab on the bottom of the screen.

__l. Click on the mapping button on the right side of the Input Mapping field.

__m. From the pop-up box double-click on cics_input

__n. Click on the mapping button on the right side of the Output Mapping field.

__o. From the pop-up box double-click on cics_output

Page 26 Exposing CICS Transactions to WLE

Page 24: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

__p. Click on the Check for CICS Exception.

__q. Click on the Implementation tab in the properties

__r. Configure the to Display Response Decision as follows

__s. Double-click on the Display Response Activity.

Lab 1 Page 27

Page 25: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

__t. Double-click on the Coach

__u. Configure the Coach screen as follows by right-clicking on the unwanted fields and selecting Delete.

__v. Close and Save the Display Response Activity.

__w. Double-click on the CICS Error Response Activity.

__x. Double-click on the Coach.

__y. Configure the Coach screen as follows by right-clicking on the unwanted fields and selecting Delete.

__z. Close and save the Coach

1.4 Testing the component in the Process Center

In order to test you must first have the CICS Resource Adapter installed and configured on the Process Center with the JNDI name used when you created the CICS SCA component inside WID.

1. While in the Single_Item_Inquiry_BPD click on the Run Process button on the right hand side of the screen above the artifacts pane. This will automatically change into the Inspector perspective, initiate the process and pause it at the Gather Input activity.

Page 28 Exposing CICS Transactions to WLE

Page 26: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM BPM 7.5 IBM Software

2. In the Inspector perspective highlight the Received entry on the top right hand side of the screen and then click on the Run selected task button.

3. Select bpmAuthor from the Pick User From Role dialog screen and click the OK button. This will bring up a browser window and display the Gather Input screen.

4. Enter a valid item id (it will default to the valid item id of 10) and press the OK button. This will close the browser window.

5. Back in the inspector click on the Refresh button.

6. Highlight the Display Response item in the activity list and again click on the Run Selected Task button.

7. Select bpmAuthor from the Pick User From Role dialog screen and click the OK button. This will bring up a browser window and display the Display Response screen.

Lab 1 Page 29

Page 27: Exposing CICS Transactions to WLE - IBM WWW Page · Lab 1 Exposing CICS Transactions to WLE The CICS Catalog application is a working COBOL application that is shipped with CICS that

IBM Software IBM BPM 7.5

8. Click OK to dismiss the Display Response screen. Back in the inspector click on the Refresh button. You should see the flow as completed.

1.5 Summary

In this lab you discovered how to integrate a CICS based transaction into a WLE Process Application. You saw how to wrap the CICS transaction as an SCA component in IBM Integration Developer and how to import the SCA component into IBM Process Designer. In the Process Designer you saw how to interface to the SCA component and how to work with the input and outputs from the interaction. This lab can be used as an example of how to integrate more complex transactions into more complex Process Applications for your application environment.

Page 30 Exposing CICS Transactions to WLE