I'm looking to create a custom software product that can model a fairly complex manufacturing process. There would be an incoming list of 100 items that all need to go through the same exact process. We'd like to do this in one batch operation since all items are typically handled at once, however there are different quantity handling requirements for each step. I could use some advice on how to proceed.
The overall flow is "Step 1" –> "Step 2" –> "Step 3" –> "Step 4", however there are limitations:
1) Step 1 = at most 50 items of the batch [creating 2 sub-batches].
2) Step 2 = all 100 items together.
3) Step 3 = at most 4 items at once [creating 25 sub-batches].
4) Step 4 = 25 items to begin, but can handle all 100 items.
We do have some tracking requirements, most notable:
A) Each entering item needs to be tracked at each step to know where in the station they were placed (i.e. To perform quality measures in my software implementation I need to track which 25 items in the batch were in the upper-left slot at Step 3 and compare the quality to those in the lower-right slot. I also need to track which 4 items were done in the 12th sub-batch of this hour's run)
I am aware of the multi-instance tasks, and of sub-processes. I was thinking of making each step a sub-process, with an input gate to know when limitation 4 has been met, and then model the entire process as a generic flow of the 4 sub-processes. Then, handle each of the quantity requirements in each of the sub-processes individually. Here are my questions:
1a) Can Activiti cleanly handle this type of batching? (i.e. can I just throw the list of items at the ProcessInstance, define some sort of sub-batch logic, and let Activiti handle the rest?)
1b) If so, is my line of thought the most efficient solution?
2) If I do the implementation as sub-processes, where is the best place to put the quantity-check logic and orchestration:
A) In the main process (thus creating multiple sub-processes),
or
B) In the individual sub-processes (thus creating 1 sub-processes that executes its internal steps multiple times)?
3) In the future, if we decided to purchase more machinery and implement a second main process (call them Steps 5 through 😎 and then have Step 2 sometimes switch an item over to Step 6 of the other ProcessInstance. Is this possible with them being separate deployed processes, or do all 8 steps need to be in the same deployed process?
Thanks!