i was a NodeCanvas user for many years and just bought your FlowCanvas.I am trying the integration and I need your advice. I have been playing around with Bolt and I like the way they solve FSM, where each state runs its own process.
Through integration I saw that you can attach a parallel flow process for every FSM. Thus, to replicate this functionality, I must:
Organise my FSM as network of nested FSMs
where each nested FSM contains a parallel flow machine
while this comes as a pretty good solution it comes with a pretty bleak prospect that for every state I must create two external documents,a nested FSM and a Flow machine, quickly raising the number of files in my project. This might seem like a small nuisance but;
WOULD IT BE POSSIBLE TO ATTACH A FLOW MACHINE TO A STATE on action state,
or even better, can I somehow create a “flow state” that will be able to listen to start and end, returning a value through end event?
Indeed, each FSM State can be a sub-FlowScript, instead of a normal Action State. Because by design each graph is serialized and stored separately as an asset, it is true that for each FSM State that you’d like to be modeled with a sub-FlowScript, a FlowScript asset graph has to be created.
Regarding your questions:
1) Do you mean attach a FlowScript asset on an existing Action State so that it runs like an action, instead of having to create a sub-FlowScript State node and attaching the FlowScript there? ( it’s not possible right now, but is that what you mean? )
2) The sub-FlowScript State node has 2 parameters in its inspector called “Success Event” and “Failure Event”, which are triggered repsective if the sub-FlowScript ended in success or failure (via the “Finish” node). Here is the related Documentation.
Regarding returning a value from the sub-FlowScript back to the FSM, this can be achieved by mapping the variables of the FSM to/from the variables of the sub-FlowScript. Please see the documentation regarding variables mapping here.
Please let me know if that is what you meant (maybe I misunderstood your question).