SOAP API 2.5 Subscription Event on many computers

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
htphuong82
User
Posts: 20
Joined: Wed May 21, 2014 4:23 am

SOAP API 2.5 Subscription Event on many computers

Post by htphuong82 » Wed Jul 09, 2014 11:20 pm

Hello,

As we have to get new data day by day on several computers/servers, we found that we can lose data at come cases. Could you have a look and confirm that we are think correctly?

Scenario: there are 2 servers called A and B.
A makes a new subscription with subscriptionId = "sub-id-A" with apiKey="xxx"
B makes a new subscription with subscriptionId = "sub-id-B" with same apiKey="xxx"
Once, A makes a request by calling eventsGetEvents with sub-id-A, the result will look like this:
Request ID: 9899 with 3 records
getEventId = ID:JBM-60794287
getEventId = ID:JBM-60794288
getEventId = ID:JBM-60794289
On the other hand, B makes another request with sub-id-B right after that
Request ID: 493 with 1 records
getEventId = ID:JBM-60794290
=> there are no old event records found. I mean ...287,...288 and ...289
My questions are:
1. So, B could not retrive data that A has just got?
2. As long as we use a same apiKey, even we use different Bullhorn accounts or subscription IDs. They will impact each others, it means some will lose data.
3. I think we will use eventsGetLastRequestId and retrieve data by eventsRegetEvents instead. Are there any other better ways?

Thanks,
Phuong
Phuong
Developer

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: SOAP API 2.5 Subscription Event on many computers

Post by s.emmons » Thu Jul 10, 2014 4:43 pm

Hi Phuong,

I may not be clear on what exactly you're trying to accomplish here, but in general you should only have to create one subscription per Bullhorn corporation.

What you described in question 1 will happen since unique subscriptions produce different data. You should not need to create multiple subscriptions for one Bullhorn corporation. This leads into questions 2 and 3, though.

I think I need a better understanding overall of what you're trying to accomplish using event subscriptions to provide better guidance here. Can you clarify that?
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

htphuong82
User
Posts: 20
Joined: Wed May 21, 2014 4:23 am

Re: SOAP API 2.5 Subscription Event on many computers

Post by htphuong82 » Fri Jul 11, 2014 4:16 am

Hello Sam,

Thanks for your very fast response as usual.

We only have one API Key for the whole company, so it means several projects are using this key to get the data from one database. It means there are several apps connecting to Bullhorn via APIs to get new data everyday. Once an app get these data, the others will miss it.
For example, there are 4 candidate C1, C2, C3 and C4 being added to BUllhorn.
App A1 connects to Bullhorn and gets C1, C2, C3
App A2 connects to Bullhorn, but just gets C4
App A3 connects to Bullhorn, gets nothing because all was gotten by A1 and A2
4. No matter what different accounts and subscription IDs we use, it will affect to each other because we are using one API Key. I would like A1, A2 and A3 will get the same data (all C1 C2 C3 C4). Is it possible?
5. Are there any chances for a company to have more than one API Key?

I hope it was clear.

Thanks,
Phuong
Phuong
Developer

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: SOAP API 2.5 Subscription Event on many computers

Post by s.emmons » Mon Jul 14, 2014 3:18 pm

Hi Phuong,

Having one API key should not be the issue here. Based on what you're saying, it sounds like the issue has to do with the timing of the eventsGetEvents call from each of the apps.

Once you run this call, the events you retrieved are placed on the reget queue. This is why "App A2" doesn't receive candidates C1, C2, and C3.

If these applications are listening to the same entity events in Bullhorn, one possibility would be just to create separate subscriptions for each app.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

htphuong82
User
Posts: 20
Joined: Wed May 21, 2014 4:23 am

Re: SOAP API 2.5 Subscription Event on many computers

Post by htphuong82 » Mon Jul 14, 2014 10:43 pm

[...]Having one API key should not be the issue here. Based on what you're saying, it sounds like the issue has to do with the timing of the eventsGetEvents call from each of the apps. Once you run this call, the events you retrieved are placed on the reget queue. This is why "App A2" doesn't receive candidates C1, C2, and C3.[...]
Yes, you got it.

[...]If these applications are listening to the same entity events in Bullhorn, one possibility would be just to create separate subscriptions for each app.[...]
Yes, it was supposed to be like that but actually it does not work. I give you an example below, I have just called eventsGetEvents from 2 different applications and we even used different accounts, different subscription IDs but the data is still missing.

Application A1 with account xxx and Subscription ID e3Subs and API Key XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXXXXX

Code: Select all

ApiStartSessionResult startSession = service.startSession("xxx", "xxxxxx", "XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXXXXX");
String session = startSession.getSession();  	
ApiEventsGetEventsResult eventsGetEvents = service.eventsGetEvents(session, "e3Subs]", 10000);
GetEventsResults results = eventsGetEvents.getResults();
getRequestId: 3783 with lenght: 7
Inserted getEventId = ID:JBM-60805354 Inserted getEventTime = 09:27:14 15-07-2014
Inserted getEventId = ID:JBM-60805355 Inserted getEventTime = 09:27:25 15-07-2014
Inserted getEventId = ID:JBM-60805356 Inserted getEventTime = 09:30:37 15-07-2014
Inserted getEventId = ID:JBM-60805357 Inserted getEventTime = 09:30:58 15-07-2014
Inserted getEventId = ID:JBM-60805358 Updated getEventTime = 09:31:51 15-07-2014
Inserted getEventId = ID:JBM-60805359 Updated getEventTime = 09:32:07 15-07-2014
Inserted getEventId = ID:JBM-60805360 Inserted getEventTime = 09:32:14 15-07-2014
Application A2 with account yyy Subsscription ID e3SubsProd and API Key XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXXXXX

Code: Select all

ApiStartSessionResult startSession = service.startSession("yyy", "yyyyyyy", "XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXXXXX");
String session = startSession.getSession();  	    	    
ApiEventsGetEventsResult eventsGetEvents = service.eventsGetEvents(session, "e3SubsProd", 10000);
GetEventsResults results = eventsGetEvents.getResults();
getRequestId: 10131 with lenght: 1
Inserted getEventId = ID:JBM-60805361 Updated getEventTime = 09:34:12 15-07-2014
Look at the result, A2 called after the call of A1 but it does not have ID:JBM-60805354 --> ID:JBM-60805360. I am not sure whether it is our fault in the code or it is an issue from Bullhorn API. Could you have a look and give advice?

Thanks
Phuong
Developer

htphuong82
User
Posts: 20
Joined: Wed May 21, 2014 4:23 am

Re: SOAP API 2.5 Subscription Event on many computers

Post by htphuong82 » Wed Jul 16, 2014 10:09 pm

Hello Sam,

Could you check with your development team and confirm whether eventsGetEvents can be used on many computers without losing data?
I will appreciate that.

Thanks,
Phuong
Phuong
Developer

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: SOAP API 2.5 Subscription Event on many computers

Post by s.emmons » Thu Jul 17, 2014 11:53 am

Hi Phuong,

When you say different accounts, do you mean different Bullhorn environments?

Unique subscriptions on the same Bullhorn environment will generate the same events, so the eventsGetEvents call will retrieve the same data from either subscription.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

htphuong82
User
Posts: 20
Joined: Wed May 21, 2014 4:23 am

Re: SOAP API 2.5 Subscription Event on many computers

Post by htphuong82 » Fri Jul 18, 2014 12:02 am

Hi Sam,

No, I meant two accounts (Bullhorn user login) on the same Bullhorn environment, for one company.

In my code, I used 2 different subscriptions "e3Subs" and "e3SubsProd" on the same Bullhorn environment. They are still impacting each others, that's my concerns.

Regards,
Phuong
Developer

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: SOAP API 2.5 Subscription Event on many computers

Post by s.emmons » Tue Jul 22, 2014 11:11 am

Hi Phuong,

Thanks for clarifying. As I understand it, the situation is as follows:

- Two unique Bullhorn user accounts
- Same Bullhorn database
- Two unique subscriptions (subscribed to the exact same entities)

If this is the case, both locations should be receiving the same data, provided that the Bullhorn user accounts are assigned to the same usertype. If they are not, then there could be usertype entitlement differences that might be the cause of the discrepancy in the data being received from the subscriptions.

If you have the appropriate access, you can verify whether the two user accounts have the same usertype in the application by going to Tools -> Users and selecting each account.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

Post Reply