MFT and JMS Notifications In scope for this page: Configuring an existing MFT Command Centre (CC) and Internet Server (IS) 7.2.3 to send a JMS Alert Using the BW MFT Palette plugin to receive the JMS Alert Example using Internet Server Thin Client Out of scope for this page: Platform Server transfers (although this shouldn't be too difficult, there's at least one additional step of ensuring the Collection Service is running) [ Pre-requisites ] [ Set up JMS Alerts ] [ MFT Command Centre: Add JMS Service ] [ MFT Command Centre: Add Alert ] [ BusinessWorks Setup: Listen for Alert Message ] [ Upload File & Receive JMS Alert ] [ Start BusinessWorks Project ] [ Transfer file with MFT Internet Transfer Client ] [ Check BusinessWorks Project received Alert ] [ Appendix ] [ Management message ] Pre-requisites 1. 2. 3. The target EMS instance should have the following queues and topics created: Alert (topic) Audit (queue) Notification (topic) Management (queue) Transfer (queue) An existing user and transfer should already be configured in CC/IS Install the BusinessWorks MFT Plug-in as local admin. Available here: G:\COMMON\jamesg\TIBCO_downloads\MFT Plugin for BusinessWorks Set up JMS Alerts MFT Command Centre: Add JMS Service 1. 2. Log into MFT Command Centre, and go to Management -> Manage Services -> JMS Services -> Configure JMS Service See the following settings as an example. The settings below assumes there's an mft user setup in the EMS instance. This isn't necessarily required. All other sections on this page are left as default.
3. Once the settings are entered, hit the 'Test' button to verify connectivity: 4. Done. MFT Command Centre: Add Alert 1. 2. Log into MFT Command Centre, and go to Management -> Alerts -> Add Alerts See the following settings as an example. This particular alert is very broad. It will be invoked for all users, for send or receive, for success or failure. Proper JMS Alerts should be configured so they are specific to particular scenarios and therefore stay relevant.
3. 4. Done. There's no need to update the Transfer Definition because the selection criteria in the Alert will pick up any relevant transfer. Note: If you are using Platform Server, then the Collection Service should be running. This can be configured under Management -> Alerts -> Manage Alerts -> (left side menu) Collection Service:
BusinessWorks Setup: Listen for Alert Message The quickest way to get a process to receive JMS Alert messages is as follows. 1. In a BW project, create an MFT Shared Connection in a folder. See the following settings as an example. Ensure the same EMS instance is used in this Connection resource as what the MFT CC is configured to use in the above JMS Service. Once it's configured, hit 'Test Connection'. It should be successful. (If you're curious, the Appendix section has a capture of the Management
message that is sent across the wire when Test Connection is invoked). 2. Create a new Listen for Alert Message process starter:
3. When configuring the Listen for Alert Message activity, point it at the MFT Shared Connection object you created just before. You can optionally use message selectors if you want your process to only pick up certain alerts. Knowing which selectors to apply here will depend on what sort of alerts you are designing your process to handle: 4. Ensure your project validates without errors. Upload File & Receive JMS Alert Start BusinessWorks Project
1. 2. Once the previous step is complete, start Designer Tester, with your process selected. Continue to the next section to upload a file. Transfer file with MFT Internet Transfer Client 1. 2. Using either Firefox or IE, open the following link: https://ws16586/cfcc/control?view=view/filetransfer/thin/filelist.jsp&fileid=# At the login screen, enter credentials: b2b_test / password 3. You will be presented with a "Transfers" screen which allows the b2b_test user to perform an upload. This is because there's a corresponding Transfer Definition created in MFT Command Centre for this user: 4. 5. Click Browse. You may get a pop-up window about your browser being unable to verify the certificate presented by the MFT Thin Client. For testing purposes this doesn't matter, click OK or whatever is necessary. (Unless you pick 'Always' you will get this pop-up for every transfer). Select the.zip file you wish to transfer and click OK:
6. 7. With the file selected, hit the button. Another box will pop up, indicating if the transfer has been a success: 8. 9. Check if the file was successfully transferred: In a different browser, log into the MFT Command Centre https://ws16586:8443/cfcc/control?view=view/admin/start.jsp, and check Reports -> Audits -> Search Audits: Check BusinessWorks Project received Alert 1. Once the file has been transferred, go back to your Designer Tester window. You should see the following result:
2. Example of AlertResponse structure: AlertResponse Expand <?xml version = "1.0" encoding = "UTF-8"?> source <AlertResponse> <Properties> <JMSCorrelationID/> <JMSType>Text</JMSType> <JMSDestination>Topic[Alert]</JMSDestination> <Comment>Alert Action JMS Comment Field</Comment> </Properties> <Body> <ns0:responsetype xmlns:ns0 = "http://www.tibco.com/mft/jms-xmlschema">alert</ns0:responsetype> <ns0:numrecords xmlns:ns0 = "http://www.tibco.com/mft/jms-xmlschema">1</ns0:numrecords> <ns0:auditrecord xmlns:ns0 = "http://www.tibco.com/mft/jms-xmlschema"> <ns0:audittype>internetserver</ns0:audittype> <ns0:auditid>a90440000038</ns0:auditid> <ns0:ckptinterval>5</ns0:ckptinterval> <ns0:ckptcount>1</ns0:ckptcount> <ns0:nodename/> <ns0:initiatorfilename>c:\0000055410.zip</ns0:initiatorfilename> <ns0:delimiter>none</ns0:delimiter>
<ns0:conversion>binary</ns0:conversion> <ns0:department/> <ns0:description>file transfer for b2b_test</ns0:description> <ns0:encryption>default</ns0:encryption> <ns0:initiatortransactionid>i904400040</ns0:initiatortransactionid> <ns0:localctfile/> <ns0:servername>*local</ns0:servername> <ns0:zosallocationtype/> <ns0:zosallocationprimary/> <ns0:zosallocationsecondary/> <ns0:zosrecordformat/> <ns0:zosrecordlength/> <ns0:zosblocksize/> <ns0:zosunitname/> <ns0:zosvolumename/> <ns0:zosstorageclass/> <ns0:zosdataclass/> <ns0:zosmanagementclass/> <ns0:ppasource1>n/a (128)</ns0:PPASource1> <ns0:ppastatus1>n/a (N/A (128))</ns0:PPAStatus1> <ns0:ppatype1>command</ns0:ppatype1> <ns0:ppadata1>c:\mft-scripts\signfile.cmd C:\MFT\from_client\received\b2b_test\0000055410.zip 20140904141600 > C:\mft-scripts\logs\20140904141600.0000055410.zip.txt</ns0:PPAData1> <ns0:ppareturncode1>0</ns0:ppareturncode1> <ns0:ppasource2>n/a (128)</ns0:PPASource2> <ns0:ppastatus2>n/a (N/A (128))</ns0:PPAStatus2> <ns0:ppatype2>command</ns0:ppatype2> <ns0:ppadata2/> <ns0:ppareturncode2>0</ns0:ppareturncode2> <ns0:ppasource3/> <ns0:ppastatus3/> <ns0:ppatype3/> <ns0:ppadata3/> <ns0:ppareturncode3/> <ns0:ppasource4/> <ns0:ppastatus4/> <ns0:ppatype4/> <ns0:ppadata4/> <ns0:ppareturncode4/> <ns0:remotectfile/> <ns0:responderfilename>c:\mft\from_client\received\b2b_test\0000055410.zip</ns 0:ResponderFileName> <ns0:sendrecv>send</ns0:sendrecv> <ns0:emailsuccess/> <ns0:emailfailure/> <ns0:transferbytecount>978</ns0:transferbytecount> <ns0:transfercompressedbytecount>880</ns0:transfercompressedbytecount> <ns0:transferstartdatetime>2014-09-04t14:16:00</ns0:transferstartdatetime> <ns0:transferenddatetime>2014-09-04t14:16:00</ns0:transferenddatetime> <ns0:transfertype>file</ns0:transfertype> <ns0:processname/> <ns0:userdata/> <ns0:transferstatus>success</ns0:transferstatus> <ns0:transferstatusmsg>transfer Complete.</ns0:TransferStatusMsg> <ns0:initiatoruserid>b2b_test</ns0:initiatoruserid> <ns0:filewritemode>create</ns0:filewritemode> <ns0:as2mdnstatus/> <ns0:proxystatusmsg/> <ns0:compression>none</ns0:compression>
</ns0:auditrecord> </Body> </AlertResponse> Appendix Management message Request Headers Body Response Headers Body