I am currently trying to write a method that determines the exit strategy of a flow control.
I have three sources that each produce orders for A, B, and AB. These orders need to be distributed to the correct sorter A, Sorter B and bufferAB respectively.
The order AB means that part A and B needs to be retrieved from their warehouses and assembled later on, which creates AB. Order AB is sent to assembly AB waiting for the parts A and B.
See below a screenshot of my method
For A and B it works perfectly. However, AB doesn't seem to be directed to all successors.
I can't seem to figure out what I am doing wrong. Could somebody take a look?
Thanks in advance!
Solved! Go to Solution.
1. in your method an end - statment was missing
2. i is an defined internal variable with NO value - so the method does not know, to which successor to move "AB"
If you set return to 3 and not i it works ( s. code below)
-> integer var i: integer --set values print name if @.name ="A" return 2 end if @.name ="B" return 1 end if @.name ="AB" return 3 end
delete the connection between flowcontrol and BufferAB
insert a second flowcontrol as 3. successor ( of the existing flowcontrol ) and
connect the exit of the new flowcontrol with Buffer A,B, AB