AnsweredAssumed Answered

Newbie doubts - Integrating Activiti with existing ERP

Question asked by carlsonwf on May 9, 2016
Latest reply on May 10, 2016 by jbarrez
Hello folks!
I started some weeks ago studying about BPM engines. I understood the overall idea, how it works and so on. I just didn't realize so far how to use it on my clients!
I would like to describe the scenario so you can maybe help me.
I have an home-made ERP, developed in Java and used by dozens of different clients. Users can insert orders on my software and, let's say that an order can have some statuses (the user can create and modify those statuses): draft, pending, closed.
For every company that uses my ERP, they can create different statuses for their Orders, this is not something hard-coded.
Another thing that is a common scenario, is that the software sends an e-mail to the order's client with the payment slip, by client's request. I can select one or more orders, generate a new payment slip that will be sent to the order's client, so he can pay the order.

Well, up to now, I have no definition of processes, so let's create 2 related to orders and the last one related to payment slips:

Scenario 1:
* User1 puts a new order on my ERP. Order status will be draft;
* If the order's total amount is bigger than US$XXX,XX, it will need to be approved by User1 manager; Order status will be "waiting for approval"
* The manager can aprove or decline this order. Order status can be "Accepted" or "Declined by manager";

Scenario 2:
* User1 puts a new order on my ERP. Order status will be draft;
* If the order's total amount is bigger than US$XXX,XX, 3 managers will need to accept this order; Order status will be "waiting for approval";
* The order will be accepted only if all the managers accept it. Order status can be "Accepted" or "Declined";

Scenario 3:
* Some client requests a payment slip for some specific order;
* User will generate the payment slip and send by mail;
* The process ends when the payment slip is sent;


On the first scenario, when the user create a new order, I will need somehow to notify Activiti that a new order is created, right? I will also need to prevent the user from changing my Order status, only allowing the status change by the BPM. As I understand everything will then be processed by activiti engine. Am I right?
So, supposing that I create those 3 process definitions, how can I "glue" the BPM logic with ERP logic? How can I do this without touching my ERP code or, touching the less possible? I don't want to use Activi Explorer, I want to control all the processes inside the ERP (I will create all the views and actions for that).




Outcomes