Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Getting Started - Tutorial : Working with Sample Operations

Working with Sample Operations
This tutorial explains how to use private processes instead of TIBCO Administrator’s GUI to create new trading partners and business agreements for TIBCO BusinessConnect. It also explains how to read the properties of an enabled protocol that belongs to a participant.
The sample operations are:
Edit the Global Variables
Before you can proceed with creating trading partners and business agreements using the provided operations, verify that all global variables are correct.
1.
Select the tab Global Variables.
2.
Figure 4 CMI Data in Global Variables
 
The default location for sample operations is in the directory
BC_HOME\protocols\cmi\examples\SampleDocs.
Insert a Participant
To create a new Host or Partner participant:
1.
2.
Select project_name > INIT_REQ > write > op_insertparticipant.
The process insertparticipant opens in the design window.
Figure 5 Insert Participant Process
3.
4.
Select the Input tab.
Figure 6 Read File for the Participant
In the Activity Input window, the fileName parameter shows which sample file will be used for this operation: INSERTParticipantREQ.xml listed in GlobalVariables/CMI/cmi.doc.path.
5.
To edit the sample XML file, go to BC_HOME\protocols\cmi\examples\SampleDocs\ INSERTParticipantREQ.xml
6.
Example 1 INSERTParticipantREQ.xml

 
<?xml version="1.0" encoding="UTF-8" ?>
- <INSERTParticipantREQ xmlns="http://www.tibco.com/AX/BC/CMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tibco.com/AX/BC/CMI ../../src/com/tibco/ax/cmi/resource/cmipayload.xsd">
  - <Participant name="partner1" isActive="true" type="Partner">     <ListOfBizLocations>
     <BizLocation name="Headquarters" addr1="PA"/>
    - <BizLocation name="loc1">
       <PrimaryLegalContact firstName="1" lastName="1"/>
       <PrimarySupportContact firstName="3" lastName="2"/>
      - <ListOfContacts>
         <BizContact lname="1" fname="1" type="Legal"/>
         <BizContact lname="2" fname="3" type="Support"/>
        </ListOfContacts>
     </BizLocation>
    </ListOfBizLocations>
  - <ListOfDomainIds>
     <DomainId domainName="AS2_ID" idName="12345"/>
     </ListOfDomainIds>
  - <ListOfEnabledProtocols>
    - <EnabledProtocol name="EZComm">
       <DefaultAS2DomainId idName="12345"/>
    - <Transports>
       <HttpTransport name="bbc" url="http://localhost:8080/EZComm"/>
      </Transports>
     </EnabledProtocol>
   </ListOfEnabledProtocols>
   </Participant>
</INSERTParticipantREQ>

 
All variables (in the example above highlighted in bold) can be modified according to your requirements.
Insert a Host
To insert a Host, modify the sample file as follows:
Example 2 INSERTParticipantREQ.xml modified for a Host

 
<?xml version="1.0" encoding="UTF-8" ?>
- <INSERTParticipantREQ xmlns="http://www.tibco.com/AX/BC/CMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tibco.com/AX/BC/CMI ../../src/com/tibco/ax/cmi/resource/cmipayload.xsd">
  - <Participant name="Host" isActive="true" type="Host">     <ListOfBizLocations>
     <BizLocation name="Headquarters" addr1="PA"/>
    - <BizLocation name="loc1">
       <PrimaryLegalContact firstName="1" lastName="1"/>
       <PrimarySupportContact firstName="3" lastName="2"/>
      - <ListOfContacts>
         <BizContact lname="1" fname="1" type="Legal"/>
         <BizContact lname="2" fname="3" type="Support"/>
        </ListOfContacts>
     </BizLocation>
    </ListOfBizLocations>
  - <ListOfDomainIds>
     <DomainId domainName="AS2_ID" idName="12345"/>
     </ListOfDomainIds>
  - <ListOfEnabledProtocols>
    - <EnabledProtocol name="EZComm">
       <DefaultAS2DomainId idName="12345"/>
     </EnabledProtocol>
   </ListOfEnabledProtocols>
   </Participant>
</INSERTParticipantREQ>

 
1.
2.
3.
4.
5.
6.
7.
The Select Processes to Load dialog appears.
Figure 7 Select Processes to Load
8.
Select the process op_insertparticipant and click on Load and Start Current.
9.
Check the response file that has been created in the logs folder (path is provided for the global variable cmi.log.path).
To learn more about viewing audit logs, see Chapter 5, Viewing Audit Logs.
Insert a Partner
To insert a Partner, modify the sample file as follows:
Example 3 INSERTParticipantREQ.xml modified for a Partner

 
<?xml version="1.0" encoding="UTF-8" ?>
- <INSERTParticipantREQ xmlns="http://www.tibco.com/AX/BC/CMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tibco.com/AX/BC/CMI ../../src/com/tibco/ax/cmi/resource/cmipayload.xsd">
  - <Participant name="Partner1" isActive="true" type="Partner">     <ListOfBizLocations>
     <BizLocation name="Headquarters" addr1="PA"/>
    - <BizLocation name="loc1">
       <PrimaryLegalContact firstName="3" lastName="3"/>
       <PrimarySupportContact firstName="5" lastName="5"/>
      - <ListOfContacts>
         <BizContact lname="3" fname="3" type="Legal"/>
         <BizContact lname="5" fname="5" type="Support"/>
        </ListOfContacts>
     </BizLocation>
    </ListOfBizLocations>
  - <ListOfDomainIds>
     <DomainId domainName="AS2_ID" idName="54321"/>
     </ListOfDomainIds>
  - <ListOfEnabledProtocols>
    - <EnabledProtocol name="EZComm">
       <DefaultAS2DomainId idName="54321"/>
    - <Transports>
       <HttpTransport name="bbc" url="http://localhost:8080/EZComm"/>
      </Transports>
     </EnabledProtocol>
   </ListOfEnabledProtocols>
   </Participant>
</INSERTParticipantREQ>

 
1.
2.
3.
4.
5.
Be sure to enter a different idName from the one used for the Host.
6.
7.
8.
The Select Processes to Load dialog appears.
9.
Select the process op_insertparticipant and click on Load and Start Current.
10.
Figure 8 Host and Partner added to the TIBCO Administrator GUI
You can debug it in TIBCO Designer by checking the output tab of the SendRequest activity in op_instertparticipant process.
Check the response file that has been created in the logs folder (path is provided for the global variable cmi.log.path).
You can also use the Log Viewer function in TIBCO Administrator to see the summary of this operation, including the failure causes.
To learn more about viewing audit logs, see Chapter 5, Viewing Audit Logs.
Insert a Business Agreement
To create a new business agreement:
1.
2.
Select project_name > INIT_REQ > write > op_insertbizagreement.
The process for insertbizagreement opens in the design window.
Figure 9 Insert Business Agreement Process
3.
4.
Select the Input tab.
Figure 10 Read File for the Business Agreement
In the Activity Input window, the fileName parameter shows which sample file will be used for this operation: INSERTBusinessAgreementREQ.xml listed in GlobalVariables/CMI/cmi.doc.path.
5.
To edit the sample XML file, go to BC_HOME\protocols\cmi\examples\SampleDocs\ INSERTBusinessAgreementREQ.xml
6.
Example 4 INSERTBusinessAgreementREQ.xml

 
<?xml version="1.0" encoding="UTF-8" ?>
- <INSERTBusinessAgreementREQ xmlns="http://www.tibco.com/AX/BC/CMI"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.tibco.com/AX/BC/CMI../../src/com/tibco/ ax/cmi/resource/cmipayload.xsd">
<BizAgreement partner="Partner1" host="Host" validStart="2012-05-01" validEnd="2014-01-01" />
</INSERTBusinessAgreementREQ>

 
7.
8.
9.
10.
11.
The Select Processes to Load dialog appears.
12.
Select the process op_insertbizagreement and click on Load and Start Current.
13.
If the operation is successful, you will be able to see the Business Agreement Host-Partner1 added to the TIBCO Administrator GUI under BusinessConnect > Business Agreements.
Figure 11 Business Agreement added to the TIBCO Administrator GUI
You can debug it in TIBCO Designer by checking the output tab of the SendRequest activity in op_instertbizagreement process.
Check the response file that has been created in the logs folder (path is provided for the global variable cmi.log.path).
You can also use the Log Viewer function in TIBCO Administrator to see the summary of this operation, including the failure causes.
To learn more about viewing audit logs, see Chapter 5, Viewing Audit Logs.
Get One Enabled Protocol
This operation will allow you to read the properties of an enabled protocol that belongs to a participant. The response will be given as property key value pairs.
14.
15.
Select project_name > INIT_REQ > read > op_getenabledprotocol.
The process for GetOneEnabledProtocol opens in the design window.
Figure 12 Get Enabled Protocol Process
16.
17.
Select the Input tab.
In the Activity Input window, the fileName parameter shows which sample file will be used for this operation: GETONEEnabledProtocolREQ.xml listed in GlobalVariables/CMI/cmi.doc.path.
18.
To edit the sample XML file, go to BC_HOME\protocols\cmi\examples\SampleDocs\ GETONEEnabledProtocolREQ.xml
19.
Figure 13 GETONEEnabledProtocolREQ.xml

 
<?xml version="1.0" encoding="UTF-8" ?>
- <GETONEEnabledProtocolREQ xmlns="http://www.tibco.com/AX/BC/CMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tibco.com/AX/BC/CMI ../../src/com/tibco/ax/cmi/resource/cmipayload.xsd">
<participantName>Partner1</participantName>
<protocol>EZComm</protocol>
</GETONEEnabledProtocolREQ>

 
20.
21.
22.
23.
The Select Processes to Load dialog appears.
24.
Select the process op_getenabledprotocol and click on Load and Start Current.
25.
If the operation is successful, the schema with values will be posted to the ResponseFile, which has been created in the logs folder (path is provided for the global variable cmi.log.path).
If the operation is not successful, you can debug it in TIBCO Designer by checking the Output tab of the SendRequest activity in the process op_getenabledprotocol.
Check the response file that has been created in the logs folder (path is provided for the global variable cmi.log.path). You can also use the Log Viewer in TIBCO Administrator to see the summary of this operation, including the causes of failure. To learn more about viewing audit logs, see Chapter 5, Viewing Audit Logs.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved