Replies: 1 comment
-
Hi @csamarchi,
The The task of the Looking at your code snippet it seems like
Yes, as mentioned above the entire graphical model including GNodes should be created in the
In the storage you are setting your source model (in your case
These two lines are responsible for generating the graphical model. const inputArray: Model.Input[] = [];
module.inputs.forEach(input => {
const input= Model.Input.builder().name(input.key).value(input.value).build();
inputsArray.push(inputs);
} would look like this with const inputArray= module.inputs.map(input=> Model.Input.builder().name(input.key).value(input.value).build()); The second line creates the new graphical model root (GGraph). In your case you would probably create your module gnodes here, build a new GGraph and then update the model state with |
Beta Was this translation helpful? Give feedback.
-
Hello,
Wanted to understand a few things more clearly. Working with the Node server and the VS Code extension. I am successfully loading and parsing our YAML file, building out the GNodes and then successfully setting the state, all in our
storage.ts
file:My understanding is that we build the GNodes and set our model state in the
storage.ts
file. Our GModelFactory picks up the GNodes from the state and then builds the GModel, to which the client will read and take it from there.My questions are:
Do I need to build the GNodes in the
gmodel-factory.ts
file? I noticed they are being built in your example here. Does it even matter?Why are we setting state in the
gmodel-factory.ts
if we are setting state in storage?What are these 2 lines doing in this function?
Do I need these if I have already created the GNodes and set it to state in the above screenshot? ^
This is all due to the following error I keep getting:
Any help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions