As you can see the Arrow to the right miss the Connection point as I resize that symbol. This exact bug was hard to understand because all calculations was correct as I examined the code. But, then I noticed that the line always adapted to the previous CP position as I resized the symbol. CP position is recalculated as symbols re-size and I have noticed before that I sometimes have a raise condition as updates are sent to the GPU. In this case I use the “new” CP position before it is updated. I will fix this, thought I am not 100% sure how yet. But, this is bugs for you – understanding why a bug happen is often 95% of the job needed to fix it.
—
Moving on the line above correctly mark the CP’s in both ends as blue (connected). Open blue or Red means not connected. One decition I have to make is wherever to allow automatic Fork & Join. I am undecided in the matter. The difference in code is that I need to maintain an array of connected links at both ends – it is doable. It is more about how it will work out and rules to apply as you code. The CP’s themselves are great – so much easier to connect links and I can mix between fixed CP’s and free connections if I want.
Here you see an automatic Fork. In this case I take the only output link from the start symbol and connect it to both Serial Clients. The question now is how will this code behave? Should it call the serial clients in sequence or parallell ? Serial or TCP is a good example because they could need some time to connect, so I would preffer a thread to do this and report back to me as they finish.
This picture (above) add an Automatic Join. Output from both Serial modules are connected to the same Exit event, so in this case I will be calling the exit signal twice.
This last picture show the same diagram with Fork & Join (fake symbols for now). Fork split the OpenCom signal into two separate copies and I can now decide in the fork if I send the in sequence or in parallell. The same with Join – I compine the two input signals to one and I can decide wherever to forward them one by one or wait on both.
Fork & Join are very powerfully components in what they do, but the question remain – should I also allow an easier, automatic version where I just connect lines directly? Forcing the user to use Fork & Join will also force them to think about why they do it, but it comes at a price. So does the auto-fork/join.