If you just want to start a FlexSim process with particular inputs, run the model, and get the outputs at the end of the run, I would call FlexSim with command line parameters.
If you want to start FlexSim, run the model partially, pause the model, send information back and forth, resume the model, etc., then I would use sockets.
I don't have a step-by-step document for beginners with exact steps on how to do exactly what you want. To make such a document, you need to actually do what you want and document what you did.
If in attempting to use the provided FlexSim and Python documentation to do what you want, you run into a particular, specific problem, then post a new question detailing what you've done, what you expected to happen, and what actually happened, and we might be able to explain why and suggest ways to overcome that specific issue. But your questions right now are generic, so you are only going to get generic answers. If you want specifics, then start actually doing it so that you can ask specific questions.
Phil BoBo
Sr. Manager, Software Development