Hello,
I’ve been trying to automate generating bill for our clients on monthly basis. Initially, I designed a simple process that looks like follows:
The process CreateNewBill
works as follows:
- An employee at the company selects a client from the bonita portal and clicks on a button called generate bill. The button will start a form where he must enter the number of working days to bill the client.
- He enters the number of days and submits the form which will start the process. Please note that the id of the client will also be submitted. (The bill will be created for the current month.)
- The number of days needs to be validated before the process is terminated.
However when I started to think about it, this solution is not the best way to do it. Why you say? because the finance
employee must manually create a bill every month.
If he forgets to generate a bill for the current month then he will not be able to do it, since the process creates bills strictly for the current month.
A better solution is to have a process that runs once a month and creates a bill for every client and the finance
employee only enters the number of days.
I have read the documentation about sub-processes but they are not clear. I have also looked up blogs and videos on youtube but non explain sub-processes.
I know how to start a process once a month to create a bill however I cannot figure out how to create multiple sub-processes for every client.
What I was thinking is to keep the process mentioned above and use it as a sub-process. Let’s say that I have 3 clients, then every month start a timer
process should start and create 3 sub-processes of the type createNewBill
.
Is this possible and how do I implement this?