9.7. Natural conversation IDs
When working with conversations that deal with persistent objects, there are several reasons to use the natural business key of the object instead of the standard 'surrogate' conversation ID.
Easy redirect to existing conversation
If the user requests the same operation twice, it can be useful to redirect to an existing conversation. Consider the following example:
You are on Ebay, halfway through paying for an item you won as a Christmas present for your parents. You want to send it straight to them, but once you have entered your payment details, you cannot remember your parents' address. While you find the address, you accidentally reuse the same browser window, but now you need to return to complete the payment for the item.
With a natural conversation, you can easily rejoin the previous conversation and pick up where you left. In this case, you can rejoin the payForItem conversation with the itemId as the conversation ID.
User-friendly URLs
A user-friendly URL is meaningful (refers to page contents plainly, without using ID numbers), and has a navigable hierarchy (that is, you can navigate by editing the URL).
With a natural conversation, applications can generate long, complex URLs, but display simple, memorable URLs by using URLRewrite. In the case of the hotel booking example,
http://seam-hotels/book.seam?hotel=BestWesternAntwerpen is rewritten as http://seam-hotels/book/BestWesternAntwerpen — much clearer. Note that URLRewrite relies on parameters; for example hotel in the previous example must map to a unique parameter on the domain model.