1
votes

I want to model a BPMN process, where two parallel tasks are validating two independent forms. If either of the forms is invalid, then we have to call the customer and request a new form. The problem is, that I don't want to call the customer about form 1 and separately about form 2 - if both forms are invalid I want to call him only once.

Is there a way to check if both validations have been completed before the call customer task is scheduled?

Then I have another question - how can I re-enter the process after the customer has been called? If one form is invalid I would like to re-enter in the corresponding form validation process when the new form is received, and if both are invalid the re-entering should occur in both subprocesses.

I am using Activiti to implement this, if it's important.

BPMN sketch

Edit

The validation tasks in each process can be days apart and I don't want to block a subprocess because of the validation in the other subprocess. I am seeking a solution, where a subprocess would continue past the validation (if it's valid), and where the customer call would be made only when both validation tasks are completed (and at least one of them is invalid).

3

3 Answers

1
votes

Okay, so the underlying problem here is that we have 4 states to thing about - valid/valid, invalid/valid, valid/invalid, and invalid/invalid. Now, we can ignore valid/valid as I assume that is the happy path model and you already know how to make that work. So what can we do for the invalid options.

One thing I get is that you need the "next step" after a form is valid to continue, even if the other form hasn't been validated yet. I think what you want to do is simply change the process for handling invalid. I think an event gateway may get us there.

Now, my experience is mostly IBM BPM, not Activity, so there is a chance this answer will not be valid BPMN, but I think it is. Basically what I would picture is that your initial split is actually a 4 way split. The 2 you have for the forms now, and 2 to event gateways. Those event gateways are waiting for each form to message either "valid" or "invalid". When answers for both are received, it would then know if the next step is to simply end that part of the flow, or fix the validity.

In IBM BPM that model would look roughly like this (sorry, my Activiti VM is down right now)

BPMN Diagram

I haven't tried diagrams before. That link is - http://imgur.com/pEHY9uO

1
votes

To expand on Drux' solution, the following diagram is built using the Activiti Modeler

Parallel Evaluation

Here, a signal event is sent after form validation for both forms. The events are captured and then correlated to determine if an email needs to be sent to the customer.

While the diagram below doesnt show it, having both status' for the forms means we can also trigger a re-entry to one or both form sub processes if we need.

Hope this helps. Gharley-BP3

0
votes

You can execute the validation in parallel and then merge the two paths with a parallel gateway. In BPMN, the merging parallel gateway waits for all incoming flows. Regarding your second question, you can simply make use of several exclusive gateways. Attached is an example process, based on your textual description. It's valid BPMN. However, I'm not an activiti expert, so I don't know if there are any activiti-specific issues. enter image description here