Unit Of Order is used in Weblogic JMS queues/topics to group messages into a single unit that can be processed sequentially even if the message are being processed by multiple consumers. For example, you can use CustomerID for the Unit Of Order to ensure that you will always process a given customers transactions in order.
Setting the Unit Of Order in an OSB Producer is quite simple.
1) Add a Transport Header action in the Request Action section of your communication node (Route, Publish, Service Call Out)
2) Set the Transport Header Properties
a) For Direction select Outbount Request.
b) Click on the Add Header button.
c) Select Defined, jms, JMS_BEA_UnitOfOrder under the Name column.
d) Select Set header to and set the <Expression> you want to use to set your Unit of Work in the Action column.
Recently our OSB administrator asked me how OSB determined what an application error was for the "Retry Application Errors" setting on the Transport page of a Business Service. It turns out there is not much documentation on this at all. So I did some testing.
OSB looks at the response-code in the Response Metadata to flag an application error. If this value is a non-zero, then it is treated as an application error.
The easiest way to manipulate this value is to add a Reply with Failure in the OSB service you are calling.
You can also manipulate the response code by inserting a response-code element in $inbound as shown below. Note: This must be done in the response pipeline
Note: I only researched this for Business Services that were calling OSB Proxy Services as that was the architecture for the context of the question asked. More research would need to be done to determine this behavior when call services outside the OSB.