Hay dos maneras de modelar un proceso de negocio: con un paradigma imperativo o declarativo. El primero utiliza un grafo que representa el orden o flujo de las tareas a realizar. El segundo es utilizando un conjunto de reglas que describen la relación entre las tareas.
El reto para los desarrolladores es entender el proceso y hacer la implementación de una solución con el paradigma adecuado. Si un procesos de negocio que no tiene una secuencia definida se implementa con BPM o BPEL, puede acabar con un grafo con cientos o miles de nodos y bifurcaciones (para un ejemplo ver figura de abajo), lo que lo haría difícil de mantener.
Por otro lado, no es recomendable modelar con reglas un flujo con una secuencia fija de acciones.
En Rules and BPEL, Mark Proctor escribe:
An alternative is to use rules to manage your business process. A purely rules based approach would use a rule set as a content based router and every decision point becomes an evaluation of your business routing rules. In addition, rules can manage service invocation by making the service invocation the consequence of firing into another rule set. Coupled with a BRMS like Guvnor the rules based process orchestration of services becomes accessible by business users in a managed environment. Coupled with a workflow or integration engine like Drools-Flow or Apache Camel the rules based business process management will allow for the management of complex long running business processes without some of the complexity and development overhead introduced by BPEL. The rules manage the decision points and the workflow engine helps manage the progression through your business process. The rules based approach won’t provide everything that you get with BPEL. For example state management, persistence, and ease of integration with WSDL are all advantages that BPEL provides that you wouldn’t get for free with a rules driven approach. In the end a rules based approach to business process orchestration should provide simplicity, modularity, and ease of development. As an architect it is worth considering a rules driven approach to business process management.
