IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > FTP

Converting business objects to COBOL copybook files during outbound processing

Use the external service wizard in Integration Designer to generate business object definitions from a COBOL program source file. These business object definitions are used during outbound processing.

Before you perform this task, make sure that:

  1. You have created a module in Integration Designer.

  2. The COBOL program source file (.ccp file) is in a local directory on your workstation.

  3. If you are going to generate a wrapper business object definition, you have imported the adapter RAR file into your workspace.

Use the external service wizard to generate a business object definition for a COBOL program source file. After you have generated the business object definition, you can run the external service wizard again to generate a wrapper business object definition from the generated business object.


Procedure

  1. To generate the business object for the COBOL program source file:

    1. In the Business Integration section of the window, right-click the module and select New > Business Object From External Data.

    2. In the Select an Input Source window, expand Languages and select Cobol.

    3. Click Next.

      Figure 1. Select an Input Source window

    4. In the Provide Details for the Mapping window, ensure that the Selected mapping value is COBOL to Business Object. Click Browse and select the .ccp file.

      For example, taderc99.ccp can be the name of the .ccp file.

    5. Click Next.

    6. In the Select Data Structures window, click Find. The new business object called DFHCOMMAREA is displayed.

    7. Select DFHCOMMAREA and click Next.

    8. Click Finish.
    A business object called DFHCOMMAREA is created in the module.

  2. Optional: Generate a wrapper business object definition. Wrapper business object definitions wrap existing business object definitions with additional function. The generation of wrapper business object definitions is optional. The option to generate wrapper business object definitions is displayed only if the adapter RAR file is imported into the workspace.

    If you want to generate wrapper business object definitions, then you must generate them before running the external service wizard.

    1. In the Business Integration section of the window, right-click the module and select New > Business Object From External Data.

    2. In the Select an Input Source window, expand Adapters, select the adapter connector project for which you want to generate the wrapper business object. In this case, select FTP.

    3. Click Next.

    4. In the Specify the Properties window, click Browse and select the business object created in Step 1, for example, DFHCOMMAREA, for the data type.

    5. To generate a business graph, select the Generate business graph for each business object check box. For generating the retrieve wrapper, select the Generate retrieve container to retrieve multiple business objects check box.

      Figure 2. Specify the Properties window

    6. Click Finish.
    A wrapper business object and a business graph, called DFHCOMMAREAWrapper and DFHCOMMAREAWrapperBG, respectively, are listed for the current module in the Business Integration window.

    If the user has selected Generate business graph for each business object and Generate retrieve container to retrieve multiple business objects, then a business object called DFHCOMMAREARetrieveWrapper and a business graph called DFHCOMMAREARetrieveWrapperBG are also listed for the current module in the Business Integration window.

    Figure 3. The wrapper business object and the business graph listed in the Business Integration window

  3. Generate the required artifacts for the COBOL copybook outbound module. This example shows the configuration for a Create operation.

    1. In the Business Integration section of the window, right-click the module and select New > External Service.

    2. Select FTP from Adapters and click Next.

    3. In the Select an Adapter window, select IBM WebSphere Adapter for FTP (IBM : version) where version is the version of the adapter you want to use, and click the CWYFT_FTPFile connector project. Click Next.

    4. In the Processing Direction window, select Outbound.

    5. Click Next.

    6. From the Service Configuration Properties window, in the Data format options list, select Use COBOL, C or PL/I data binding.

      This is not a data binding, but a data binding generator. The tool generates the appropriate data binding code for you in the current module.

      Figure 4. Specify the Security and Configuration Properties window

    7. Specify the other required properties for the outbound operation, and click Next.

    8. In the Operations window, click Add and then Create. For the retrieve operation, select Retrieve. Select the data type as User defined type from the list and click Next.
    9. Browse for the input type (either DFHCOMMAREA, DFHCOMMAREAWrapper, or DFHCOMMAREAWrapperBG) and click OK. For the Retrieve operation, browse for the appropriate output type (either DFHCOMMAREA, DFHCOMMAREARetrieveWrapper, or DFHCOMMAREARetrieveWrapperBG).

      Figure 5. The Data Type Selection window

    10. Click Next.

    The data bindings used by the COBOL copybook, WSDL files, import files, and other artifacts are generated. See the Project Explorer window for the generated data binding classes.

    Figure 6. Data bindings used by the COBOL copybook, WSDL files, import files, and other artifacts

    data bindings used by COBOL copybook, WSDL files, import files, and other artifacts are listed in the Business Integration window" />


Results

A business object, a wrapper business object, and a business graph are created for the COBOL program source file for the outbound module. Artifacts are generated for an outbound Create operation that uses the COBOL copybook data binding. This module can be deployed on IBM BPM and tested for the Create operation.

To generate artifacts for other supported operations (Append and Overwrite), follow the same steps, beginning with Step 3(h).


What to do next

Deploy the module.

WebSphere Adapter for FTP documentation