API
Version 7.x > API > IntegrationBus SubscribeToObjects() View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 6/4/2013 12:52:17 PM
   
IntegrationBus SubscribeToObjects()
I want to subscribe to custom table INSERT actions (I'd even be happy with any custom table action). All I see for predefined objects is CUSTOM_TABLE_ITEM_PREFIX. I've attempted to initialize the subscription this way:
ObjectIntegrationSubscription ois = new ObjectIntegrationSubscription(ConnectorName, TaskProcessTypeEnum.AsyncSnapshot, TaskTypeEnum.All, "MySite", "customtableitem", "MyTable.UserSync");
SubscribeTo(ois);
AND this way:
ObjectIntegrationSubscription ois = new ObjectIntegrationSubscription(ConnectorName, TaskProcessTypeEnum.AsyncSnapshot, TaskTypeEnum.All, "MySite", "customtableitem.mytable.usersync", "MyTable.UserSync");
SubscribeTo(ois);
AND this way:
SubscribeToObjects(TaskProcessTypeEnum.AsyncSnapshot, PredefinedObjectType.CUSTOM_TABLE_ITEM_PREFIX);
And the ProcessInternalTaskAsync() method is never fired off. What am I missing?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 6/4/2013 2:47:09 PM
   
RE:IntegrationBus SubscribeToObjects()
I was able to use this without a problem on a custom table object.
SubscribeToObjects(TaskProcessTypeEnum.AsyncSnapshot, "customtableitem.mytable.usersync", TaskTypeEnum.CreateObject);

User avatar
Member
Member
Swainy - 6/6/2013 9:50:54 AM
   
RE:IntegrationBus SubscribeToObjects()
Hi Frogg,

Yeah that should work fine.

A few examples of a recent one i've done works in the same way...
SubscribeToObjects(TaskProcessTypeEnum.AsyncSnapshot, PredefinedObjectType.ORDER);
SubscribeToObjects(TaskProcessTypeEnum.AsyncSnapshot, PredefinedObjectType.USER, TaskTypeEnum.UpdateObject);
SubscribeToObjects(TaskProcessTypeEnum.AsyncSimpleSnapshot, PredefinedObjectType.CUSTOMER);
SubscribeToObjects(TaskProcessTypeEnum.AsyncSnapshot, "ecommerce.address");

(the bottom one will subscribe to all events for ecommerce.address).

Really enjoy working with the integration bus, definately the way forward!

Matt