I've got some rather basic questions on creating/editing models that I wanted to throw
out there.
In the changes I'm making to the WebService to Relational Importer, which is now the
WSDL to Source Model Importer, I'm creating both physical models and views. I've
his several bumps in the road along the way, all of which I've worked around to get an
initial implementation in from of as many eyes as possible, but I would like to resolve
them 'correctly'
1) This question is kind of stupid, I pretty muck know what I'm doing is dumb.
I'm parsing XSD to create procedures in a view model. I don't know how many
procedures or what the params/results will will like until I'm done with the XSD.
Currently, when the code recognized a token that's going to need a procedure, it adds
on to the model, then when it recognizes a token that will require a parameter or result,
it adds it to the model. What I've found is that when time comes to create the
transformation, and I go back to the model to get the params, I don't find what I
expect. The correct answer in this case is to hold it all in the parser and create the
model objects all at the end, but more generally, should I expect that I can get the model
objects I add to a ModelResource back from that resource before I have saved it?
2) More generally, if I'm creating more than one model resource in the run of an
importer, what is the right way to save my changes so that follow on actions only happen
once? I seem to be triggering multiple runs of workspace build and PVDB creation. Is
wrapping all of the saves in a single WorkspaceModifyOperation enough?
thx,
~jd