First of all, an ESB is just a concept, while BPEL is an OASIS standard based on XML and web services. The BPEL file is actually XML.
You use ESB when you need to connect 2 or more applications together to avoid direct point-to-point integration. This offers various benefits, such as translating messages from one format to another or introducing other messaging templates. An ESB communication is usually stateless, that is, the message goes through, is routed to its destination, and it ends there. ESB is a very broad term, interpreted and misinterpreted by suppliers to sell their products.
A business process management system that implements BPEL and similar technologies, on the other hand, is associated with tracking the progress of various activities and their relationships. The BPEL process is very similar to a flowchart. The BPEL process saves state, tracks its progress and flow, and is commonly used (though not necessarily) in transactions with long transactions, which may also include manual human tasks.
A sample BPEL process tutorial is a loan processing application. A request for a clientโs credit arrives, and the process first performs some automatic checks using web services calls in some systems, and if the credit rating is too low, the system informs the manager about the need to manually evaluate the form (through some workflow system). The process then expects a callback from the personโs workflow system, uses some correlation method (some identifier) โโto match it with the correct BPEL process (so that the correct client is served), and resumes the process accordingly.
source share