HI Marc,
What you are looking for is only once guaranteed processing design.
The wM platform as is today provides guaranteed delivery in
all cases - that is, the messaging system will deliver a message to the
intended service for processing at least once. From a processing
perspective, the IS guarantees that at least one attempt to execute the
service associated with the document will be made. Under certain
conditions, further attempts will be made if the original attempt fails.
However, in many cases coding/development will be required on the part of the user/developer in order to obtain the desired guaranteed processing behavior. That being said, let’s get on to your questions…
Are you looking for
Case1:
- Do some DB Operation
- Publish the Document
- The trigger Subscribes the document.
- The process service of the document fails.
If Failed -> roll back up to 1.
If suceed -> commit till from step 1
or
Case 2:
- Do some DB Operations
2)Publish Document
- The trigger subscribes the document.
- Process service of the document executes successfully.
- Some DB Operation.
If Failed rollback till 1
If Success commit from 1
Both these involve coding to handle your transactions.
Case1:
Once the document is published successfully.
If the service exits successfully, there is no problem: the trigger
dispatcher acknowledges the message in trigger queue, which then
acknowledges the broker (if the document was guaranteed), and the document is removed from the broker queue.
a)The trigger dispatcher will look at the type
of exception associated with the service failure. In IS 6, there are two kinds of exceptions that can be returned from a service failure. The first is the default Service Exception (e.g., using the Flow “Exit” operation with a value of $failure). This exception is thrown whenever something is functionally wrong and causes the IS to log failure after logging the error, the trigger dispatcher acknowledged the trigger queue which causes the broker to be acknowledged.
b) The Runtime Exception is signaled by the IS 6 adapter runtime in
conjunction with adapters that are able to determine that an adapter service failed due to a transient error - an error that is temporal in nature, like unavailability of a resource due to network issues - that may be resolved if the service is retried again later. When a runtime exception is received,the trigger dispatcher will negatively acknowledge, the trigger queue. This AdapterRuntime Exception cannot be signaled by using flow services until we use a custom adapter built using ADK.
Based on these signals, we can rollack or commit the original flow service.
Case2: It needs a couple of coding at the subscriber end and also at publishing end to have only once guranteed processing.
Hope this Helps.
~Prabhu
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB