1
votes

We use Camunda to run business processes but my question is more about general BPM patterns than a specific tool that implement it.

Let suppose the following very simple use case and a homemade application on top of it that use BPM engine API to query tasks and complete them. enter image description here

Let suppose that Action 1 will be auto assigned to John and Action 2 to Bob. From my comprehension of BPM, when the process start, Action 1 is created and assigned to John. When John complete the Action 1, the Action 2 is created and assigned to Bob. And that's what we want because Bob could not start working on Action 2 if Action 1 is not yet completed. Fine...

Now suppose that as the team manager, I want to schedule activities of John and Bob. I'm thinking about introducing an initial task handled by me to configure a planning.

enter image description here

When the process now start, a new task is created and is assigned to me. I want in my homemade application to query the BPM engine in order to get all tasks (actives and inactives) in order to add planning information (planned start date and due date). For example, I want to specify that:

  • Action 1 should start on 01/01/2021 and should be closed on 03/01/2020.
  • Action 2 should start on 04/01/2021 and should be closed on 05/01/2020.

With this kind of information, John and Bob could connect to the task list and see that a "not yet started" task is waiting for them on a specific time range. The main goal of this is to manage a team calendar of activities.

I don't see how to implement that in BPM due to the fact that, in my comprehension, tasks are created when the process reach them so we could not have information about "Not Yet Started" tasks.

Any ideas? Suggestions? Bests practices?

Tx

2
We need some more details to give you the right model. Your approach brings up the following questions - - Can action 2 be started before Action 1 completes? - Can the user start the action before the start date the manager assigns? The answers to those questions will change the model.Drux
Actually, Action 2 cannot be started before action 1 is completed AND before the start date the manager assignsNico

2 Answers

1
votes

I asked a question above, but if the answer is "Action 2 still requires Action 1, and I don't want people to see the tasks before their start date." Then the model would look like this -
enter image description here

The timers would be set to the start dates the manager picked. I have a strong opinion that the tasks shouldn't be in the list if the user can't work them. So if they should not work it before the start date, we shouldn't have it in their task list. This is different than say, a report on the status of the process, which certainly can show that we are waiting until date X to issue Action 1. There is also a way to model it so that someone can say "Yeah, you know what, I want to start this now" and trigger the action early from that dashboard.

0
votes

To have the tasks for John and Bob active at the same time, you could use a parallel gateway ... bpmn parallel flow and then filter the tasks in a custom task list based on the configurations you made ...

If you want to keep the sequence of tasks (which is the better option imho) you can still set variables in your planning task up front and then read these values when the second task is started by registering a TaskListener on your model.