Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Solved Deliveries location

More
13 Mar 2018 09:34 - 13 Mar 2018 11:23 #1 by Jackline
Deliveries location was created by Jackline
Hello,

Is there a table in Stambia logs where are stored all deliveries?
I do have a table STB_LOG_DELIVERY_DLV but it doesn't contain all the deliveries present on the Runtime.

thank you in advance
Last edit: 13 Mar 2018 11:23 by Jackline. Reason: Solved
More
13 Mar 2018 09:56 - 13 Mar 2018 10:01 #2 by Nicolas Verscheure
Replied by Nicolas Verscheure on topic Deliveries location
You can use the startcommand tool and the get list deliveries.
.\startcommand.bat "connect to localhost port 42000;get list deliveries"

You can use it in a Process.
Last edit: 13 Mar 2018 10:01 by Nicolas Verscheure.
More
13 Mar 2018 10:29 #3 by Jackline
Replied by Jackline on topic Deliveries location
Thank you Nicolas for your response.

I try by using "Operating System" utility but i get an error because of "Argument has embedded quote".

Is there another way to launch the command via a process?
More
13 Mar 2018 10:35 - 13 Mar 2018 10:36 #4 by Nicolas Verscheure
Replied by Nicolas Verscheure on topic Deliveries location
You can use in a scripting action :
__ctx__.executeRemoteCommand(<runtimeHostName>, <runtimePort>, <runtimeCommand>);

In attachment, a process example with localhost.

This message has an attachment file.
Please log in or register to see it.

Last edit: 13 Mar 2018 10:36 by Nicolas Verscheure.
More
13 Mar 2018 10:59 - 13 Mar 2018 11:00 #5 by Jackline
Replied by Jackline on topic Deliveries location
Thanks a lot :)

I get them through a variable
Last edit: 13 Mar 2018 11:00 by Jackline.
More
14 May 2018 14:44 #6 by cherif
Replied by cherif on topic Deliveries location
Bonjour Nicolas,

J'ai besoin de récupérer le retour de cette commande :
__ctx__.executeRemoteCommand("localhost", "42000", "get deliveries format %name,%packageid,%exportdate");
dans un fichier .txt.
Comment je peux le faire?

Cordialement,
More
15 May 2018 08:07 - 15 May 2018 08:08 #7 by Jackline
Replied by Jackline on topic Deliveries location
Bonjour Cherif,

Si je pars de l'aide apportée par Nicolas, je te propose la solution suivante:

Tu peux utiliser un WriteTxtFile après avoir récupéré tes data comme suit:



La commande est exécutée via le script et le résultat est stocké dans une variable



Puis la variable est assignée comme contenu du fichier




!!!! Le deuxième paramètre de la commande (le port) est de type INT


Voilà :) j'espère que ça t'aidera
Attachments:
Last edit: 15 May 2018 08:08 by Jackline.
More
15 May 2018 12:10 - 15 May 2018 12:11 #8 by Thomas BLETON
Replied by Thomas BLETON on topic Deliveries location
Autre solution plus directe pour produire le fichier : utiliser directement le scripting dans l'action Write File, par exemple :

==== Write File action's code ===
%e(rhino){
__ctx__.executeRemoteCommand("localhost", "42000", "get deliveries format %name,%packageid,%exportdate");
}e(rhino)%
==== End of Write File action's code ===
Last edit: 15 May 2018 12:11 by Thomas BLETON.