function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sdetweilsdetweil 

remote system integration message delivery questions, help needed

We need to integrate SFDC service cloud with our on premise application..

 

There are two different approaches, and I have both working

 

1. create outbound message and workflow to trigger sending updates when records change

     this supports store & forward, retry, queuing, message batching, sessionid provided for callback

 

     but, it is limited to the fields of ONE record type..

          there is an expected response code, and a response timeout (few seconds)

     to get any additional data, the message

     receiver must callback to sfdc to collect the rest of the data..

     THIS connection is not guaranteed of course..

 

2. create your own web service, and message (develop wsdl, build server and import as class into sfdc)

     and then in the class (with some special coding), collect all the data into the custom message,

     then send (using @future).. use a trigger to fire off the class as required.

     this works very well, is about  5 times faster than the outbound message with callbacks.

 

     but, there is no store and forward, retry, ...

     I don't see any mechanism to do this on the salesforce server side.

 

I am strongly in favor of approach 2, as there could be hundreds of records required on access to complete the data

and accessing them remotely is really bad form to my system design & implementation experience.. access the data locally always, unless forced, in the exception, to access remotely..

 

in either case the message receiver must implement some JMS to queue the messages and process them asynchronously.

 

the data is a combination of fields from records, and a list of all the comments and attachments to the modified record.

the list is variable length. sf does this with foreign key tables not with actual data in the base object.   so on failure, I would have to store off all the data, then reconstruct it..

 

I can't lookup the data at a later time, as the data might have change since the first update, I need to apply changes in order, and don't have a method for combining changes prior to distribution.

 

anyone have any pointers to how others might have solved this? I searched on outbound, syncronization (with and without the H), guaranteed, recovery....

 

I have both methods implemented and can toggle between them by activating the trigger and deactivating the outbound message and vice versa.

 

I still have to design recoverability on the opposite end

 

Sam

 

sdetweilsdetweil

back to the top

SuperfellSuperfell

You mentioned having changes applied in order, you should note that the queue that backs the Outbound messaging feature does not guarantee delivery in change order. (in the event of failures, retries are pushed to the back of the queue, so given changes c1, c2, c3, if the delivery attempt of c1 fails, it will be set to retry at a new point in time, and the new order of delivery could be c2,c3,c1

sdetweilsdetweil

Yikes!!

 

thanks for that tidbit..

 

Sam

SuperfellSuperfell

I"m not sure @future guarantees an execution order either, in either case you are going to want to ship & compare sysmodstamps.

SuperfellSuperfell

Also for OM, this tends not to matter because (a) a given recordId will only be queued once (i.e. you can't have record Id 3 in the queue 4 times), and the data sent is the latest version of the data at delivery time, not the data at trigger time. So, order only tends to matter in the case where you have relationships between the data spread across types (where in some cases you can end up receiving child rows with pointers to parents you haven't yet seen)

sdetweilsdetweil

SimonF wrote:

I"m not sure @future guarantees an execution order either, in either case you are going to want to ship & compare sysmodstamps.


 

good point.. thanks

 

Sam

sdetweilsdetweil

So, it sounds like I want to recreate the OM table function to support my own data.

 

the object changes, my trigger fires, and inserts a new complex object into my OM table (with sequence number)

 

a new trigger fires on the OM table and it batches, in seq number order the messages.

if the send is successful, the messages are removed from the table,

  then the trigger loops up and selects more messages if there are any.

 

Sam