Skip Navigation Links | |
Exit Print View | |
Oracle Java CAPS Adapter for Batch Tutorial Java CAPS Documentation |
Oracle Java CAPS Adapter for Batch Tutorial
Importing Non-JBI Based Sample Projects
To Import a Non-JBI Based Sample Project
About the Oracle Java CAPS Business Process Manager Sample Project
Considerations for BPM Projects
Creating the bpBatch_Inbound_LocalFileIn_FTPOut Project
Creating the bpBatch_Inbound_LocalFileIn_FTPOut Business Process
To Create the Business Process
Adding Business Rules to the Design Elements
To Generate the Connectivity Map
Configuring the Adapters' Properties
To Configure the BatchInbound Adapter Properties
To Configure the BatchLocalFile Adapter Properties
Configuring the BatchFTP Adapter Properties
Creating the Deployment Profile
To Create the Deployment Profile
Building and Deploying the Project
prjBatch_Inbound_FTPIn_LocalFileOut
Considerations for JCD Projects
The Adapter for Batch JCD Sample Projects
The prjBatch_Inbound_FTPIn_LocalFileOut Sample Project
Creating the Java Collaboration Definitions
Creating the jcdBatch_Inbound_FTPIn_LocalFileOut Collaboration
To Create the jcdBatch_Inbound_FTPIn_LocalFileOut Collaboration
Using the Java Collaboration Editor
To Create the jcdBatch_Inbound_FTPIn_LocalFileOut Collaboration Business Rules
To Generate the Connectivity Map
Configuring the Adapters Properties
To Configure the BatchInbound Adapter Properties
Configuring the BatchFTP Adapter Properties
Building and Deploying the Project
The prjBatch_Streaming Sample Project
Creating a Java Collaboration Definition
To Create the jcdBatch_Streaming Collaboration
Using the Java Collaboration Editor
To Create the jcdBatch_Streaming Collaboration Business Rules
To Generate the Connectivity Map
Configuring the Adapter Properties
To Configure the BatchInbound Adapter Properties
Configuring the BatchFTP Adapter Properties
Configuring the File Adapter Properties
Building and Deploying the Project
The prjBatch_Record Sample Project
Creating a Java Collaboration Definition
To Create the jcdBatch_Record Collaboration
Using the Java Collaboration Editor
To Create the jcdBatch_Record Collaboration Business Rules
To Generate the Connectivity Map
Configuring the Adapter Properties
To Configure File Adapter Connectivity Map Properties
To Modify the File Adapter Environment properties
To Configure the BatchRecord Adapter Properties
To Modify the BatchRecordParse Adapter Connectivity Map properties
To Modify the BatchRecord Adapter Environment properties
To Create the Deployment Profile
The prjBatch_Secure Project Components
The prjBatch_Secure Project Collaboration Definitions
To Create the jcdBatchFTPOverSSL Java Collaboration
To Create the jcdBatchSCP Java Collaboration
To Create the jcdBatchSFTP Java Collaboration
jcdBatchFTPOverSSL Business Rules
jcdBatchFTPOverSSL Java Source File
Completing the prjBatch_Secure Project
Configuring the Adapter Properties
To Configure the File Adapter Connectivity Map properties
To Modify the File Adapter Environment properties
To Modify the Batch/FTP Adapter Connectivity Map Properties
To Modify the BatchFTPoverSSL Adapter Environment Properties
To Create the Sample Directories
To Create the Deployment Profile
The prjBatch_Record Project demonstrates the following:
The inbound FileIn Adapter polls the input directory periodically. When it sees the specified file, it renames the file by adding .~in to the end, and triggers the Java Collaboration.
The Collaboration generates a string. This string is converted into a record using BatchRecordCreate. The record is appended to the payload of BatchRecordCreate.
The operation in Step 2 is repeated 10 times, resulting in 10 records in the BatchRecordCreate payload.
The BatchRecordCreatepayload is copied to the FileOut payload.
The outbound FileOut Adapter writes the payload to an output file.
The Collaboration takes the BatchRecordCreate payload, and uses BatchRecordParse to parse the records.
Each parsed record is copied to the FileOut payload, and the FileOut Adapter writes the payload to the output file.
The operation in Step 7 is repeated until all 10 records are retrieved.
The first step is to create a new Project in the NetBeans IDE.
The next step in the sample is to create a Java Collaboration using the Java Collaboration Definition Wizard. Once a Collaboration Definition has been created, the Business Rules of the Collaboration are written using the Collaboration Editor.
The Collaboration Definition Wizard (Java) appears.
The Name field now displays receive.
The BatchAdapter.BatchRecord OTD is added to the Selected OTDs field.
Another BatchAdapter.BatchRecord OTD is added to the Selected OTDs field.
The FileClient OTD is added to the Selected OTDs field.
The Java Collaboration Editor opens to the new Collaboration in the right pane of the NetBeans IDE.
The prjBatch_Record Project uses the jcdBatch_Record Collaboration created in To Create the jcdBatch_Record Collaboration. To complete the Collaboration, use the Collaboration Editor to create the Business Rules.
Be careful to open all nodes specified in the directions to connect the correct items. The completed business appears as follows in the Java Collaboration Definition Editor's Business Rules Designer.
The Java Collaboration Editor opens to the jcdBatch_Record Collaboration.
The Enter a Comment dialog box appears. The comment is placed on the Business Rules tree under the last selected item.
Once the Comment is created, it can be moved by clicking the comment and dragging it up or down the Business Rules tree to a new location.
The Create uninitialized variable loopCount (of type int) rule defines a loop count integer variable
The Create Variable dialog box appears.
The new variable is added to the Business Rules tree.
The Create uninitialized variable recordStr (of type String) rule defines String called recordStr .
The Create Variable dialog box appears.
The Class Browser dialog box appears.
The new variable is added to the Business Rules tree.
The For Loop and its Business Rules create ten records, each incremented by 1 (as a String). It does a put for each incremented record until the payload contains ten records.
A For Loop is added to the Business Rules tree.
The Number literal box appears.
The Less Than method box appears.
The Increment method box appears.
The Number to String Conversion dialog box appears.
The intToString method box appears.
The Add method box appears.
The Class Browser dialog box appears.
The getBytes method box appears.
The method selection window appears.
The put method box appears.
The method selection window appears.
The finish method box appears in the Business Rules Designer canvas.
The Copy BatchRecord_Create.Payload to FileClient_1.ByteArray sets the ByteArray of the File Adapter to the payload.
The method selection window appears.
The writeBytes method box appears.
The Copy BatchRecord_Create.Payload to BatchRecord_Parse.Payload rule copies the payload to the BatchRecord_Parse Adapter.
The While statement and its Business Rules parse the ten records and publishes each record to the File Adapter.
A While statement is added to the Business Rules tree.
The method selection window appears.
The get method box appears.
The method selection window appears.
The writeBytes method box appears.
The method selection window appears.
The finish method box appears.
The Connectivity Map provides a canvas for configuring a Project’s components.
The New Connectivity Map appears and a node for the Connectivity Map is added under the Project, on the Project tree, labeled CMap1.
Once your Java Collaboration Definition is completed you can use it to generate your Connectivity Map. Generating the Connectivity Map will automatically populate the canvas with the correct components and bind the components according to the information provided by the Java Collaboration Definition.
The cmBatch_Record_jcdBatch_Record service is added to the canvas.
The External applications are added to the Connectivity Map and the Bindings are created. The red squares in the bindings represent the Batch Adapters. The red color indicates that the adapter properties have not been configured.
Environments include the External Systems, Logical Hosts, Application Servers and Message Servers used by a Project and contain the configuration information for these components.
The esFile window is added to the Environment Editor.
The LogicalHost1 box is added to the Environment and LogicalHost1 is added to the Environment Editor tree.
A new Application Server is added to the Services tree under LogicalHost1.
The prjBatch_Record Project uses four Adapters, each represented in the Connectivity Map as a node between an External Application and a Service.
The inbound File Adapter properties are set from the Connectivity Map.
The Properties Editor opens to the inbound File Adapter properties.
|
|
The Properties Editor opens to the File Adapter Environment properties.
|
The BatchRecord_Create Adapter’s specific properties are set from the Connectivity Map.
The Properties Sheet opens to the Adapter’s Connectivity Map properties.
|
The Properties Editor opens to the Adapter’s Connectivity Map properties.
|
The BatchRecordCreate and BatchRecordParse Adapters share the same Environment Properties. The default BatchRecord Adapter Environment property settings can be used for this Project, but they must be accepted.
The Properties Editor opens to the BatchRecord Adapter Environment properties.
A Deployment Profile is used to assign Collaborations and message destinations to the Application Server and message server. Deployment Profiles are created using the Deployment Editor.
Make sure that the selected Environment is envBatch_Record .
The Project’s components are automatically mapped to their respective system windows.
Note - If any of your Project components did not successfully map to an external system, open each of your Adapter’s configuration properties (Connectivity Map and Environment) and click OK to close and save the current configuration, then click Automap again.
The Build process compiles and validates the Project’s Java files and creates the Project EAR file.
If there are any validation errors, a Validation Errors pane will appear at the bottom of the Deployment Editor and displays information regarding the errors.
Before You Begin
Make sure the GlassFish server is started.
The Deploy prompt appears.
A message appears when the project is successfully deployed.
To run your deployed sample Project do the following
Note - For UNIX, be sure to upload the appropriate LogicalHost.