Technical Blog Post
Abstract
How to subscribe to partner events in SFG when myFilegateway UI is not available to partners.
Body
In IBM Sterling Filegateway (SFG) partners and/or administrators can subscribe to events so that they are alerted via email when the events occurs
in one of the file routing.
Partners subscribe to events using the myFilegateway UI and administrators via the filegateway admin UI.
This blog aims to provide directions on how to subscribe events for a partner, if the myFilegateway UI is not
available to that partner.
There are 2 ways the partner that does not have access to myFilegateway can subscribe to events:
1. The partner will contact a SFG administrator that will login to myFilegateway with the partner user id and password
and subscribe to the event in behalf of the partner.
2. For security reasons, the partner might not want to provide the password account details, in that case the administrator
can configure a BP using the XAPI service together with the api manageFgRouteEventSubscription to subscribe to the event
requested by the partner.
See below a description on how to use the XAPI service to subscribe to SFG events:
a) Create a BP that uses the XAPI service that will use the manageFgRouteEventSubscription api.
This api can be used to subscribe to events or modify existing subscriptions.
<process name="test_XAPI">
<sequence name="Sequence Start">
<operation name="XAPI Service">
<participant name="XAPIService"/>
<output message="XAPIServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="api">manageFgRouteEventSubscription</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
b) Now you need to create an input file for the above BP and for that you need the following information:
- The user account name of the partner that wants to subscribe to the event.
- The event subscription key to be assigned, this is generally formed of a timestamp with 20 characters
i.e. 20151216101530405455
You should make sure that the event subscription is unique in the database table FG_EVENT_SUBSCR,
the column EVENT_SUBSCR_KEY contains that entry and it must be unique.
- The event code that the partner wants to subscribe.
c) Your input file should look like below:
<FgRouteEventSubscription Active="" Createprogid="Required" Createts="Required" Createuserid="Required" EventCode="Required" EventSubscriptionKey="Required" Lockid="Required" Modifyprogid="Required" Modifyts="Required" Modifyuserid="Required" Subscriber="Required"/>
d) As an example, if I wanted to subscribe event code FG_0419 for partner Consumer1,
I would generate an input file like the following:
<FgRouteEventSubscription Active="Y" Createprogid="xapi_bp" Createts="2015-12-16 10:45:00" Createuserid="fg_sysadmin" EventCode="FG_0419" EventSubscriptionKey="20151216101530405455" Lockid="0" Modifyprogid="xapi_bp" Modifyts="2015-12-16 10:45:00" Modifyuserid="fg_sysadmin" Subscriber="Consumer1"/>
e) You can verify that the subscription has been added correctly by querying the database table FG_EVENT_SUBSCR and verify the subscription for that partner.
Following the example above, I would use the SQL query below to verify the event subscriptions for partner Consumer1:
select * from FG_EVENT_SUBSCR where SUBSCRIBER='Consumer1'
Note: The BP provide is a sample BP and you need to upload the input file manually when running the BP,
you can fully automate the partner subscription of the event code by inputing into your BP simply the partner name and event code and then
using timestamp utility to generate the time stamps required and create your input file using the XSLT service accordingly.
More information about the XAPI service can be found in the IBM Sterling B2B Integrator documentation:
http://www-01.ibm.com/support/knowledgecenter/SS3JSW_5.2.0/com.ibm.help.svcs_adpts_m_z.doc/XAPI_svc.html
For other api's available and their documentation, you can consult the xapidocs directory of you SB2BI installation:
<ISBI_installDir>/xapidocs
UID
ibm11121643