I want to compile a custom code that: 1. checks the item type of the first processed item when the processing finishes, (the item type of flow items are available in a global table and in the arrival schedule table of the source.) 2. checks the item type of the next arrival. if the item type of the next flow item is the same as the processed item, keeps the output port closed. But if the item type of the next arrival is different than the processed item, the out put port of the processor should now become open for transporters to pick the items up from the processor.
I will put this code at the processFinish trigger of the processor. I would appreciate help on coding since I am not very familiar with C++ coding.