Hi Robert,
I do not think a wait loop is a really reliable way to ensure the execution is finished. There can be a multitude of reasons, why the set wait time could be exceeded, thus failing again. Additionally, this would also lead to excessive waiting times.
As Armin already mentioned, I also suspect there is some sort of error, which intererupts the execution of the chain.
You could try to modify the result of your connectors . In the following picture you can see an additional output parameter calles “firstResult” which contains the first result. You may be able to map this single result to your variables, which would make the following scripts obsolete.
If you devide to go the route of a SSBo, you can find a bit more information about them here.
In General this is a relatively simple task to achieve. However, there are a few caveats to watch out for.
First, you would need to create a new SSBO and add the connector to it. (or Reuse an exisiting one)
For creating of the SSBO, follow the steps I linked above. Afterwards, you can add a connector by editing the BO using the edit Button next to the view/delete buttons just below the +(create) button.
Now you should be in a view, where you can edit the description, change associated projects and add/remove connectors, business objects and plugin.
The Business Object itself would look something like this:
input parameter: SN -> int (if it is a number)
output parameter: mat -> your data structure, if applicable, or simply any
Code:
var oAuftrag = Simplifier.Connector.BLN_CMT_SQL_DEV.search_SN({: input.SN}).
Var oMat = Simplifier.Connector.BLN_CMT_SQ_DEV.searchMatNR_Import(: Auftrag.id}).
output.mat = oMat;
And so on for the other two connector calls.
You will need to change the input of the connector call to match your parameters. This depends on the definition of the call in your connector.
By default the sql-connector retrieves a list of results called result. If you want to acces the first result, you would need to change the call as follows:
var yourFirstResult = Simplifier.Connector.BLN_CMT_SQL_DEV.search_SN({: input.SN}).result[0]
This is basically the output parameter you used accessed via the script before.
I have attached a transport to this post, which contains a simple example.
Kind regards
Lukas
- This reply was modified 2 months ago by Lukas Henninger. Reason: Typos