0
I want to ask for help in this process, I have an application in angular.js that I need to issue all the labels of a process, and then all the labels of a second process.
The problem is that it is occurring to print a process label one after a process label 2 and so on.
This is probably happening because the process executes the second process before the first one is finished.
This way I need to ensure that the first process was finalized before executing the second, some idea?
enviaImpressao = function (impressor) {
// Imprime etiquetas de Caixa
ImprimeEtiquetaService.enviaParaImprsessao ( numeroCaixa, "BOX" ).then(function (result) {
// Imprime etiquetas de Picking
ImprimeEtiquetaService.enviaParaImprsessao ( numeroPedido, "PICKING" ).then(function (result) {
}
Thanks in advance.
Enter more details of your code, if possible. With what you have there, I believe that if you chain the execution of "picking", your code will work: Imprimeetiquetaservice.envirParaImprsessao ( numeroCaixa, "BOX" ).then(Function (result) Imprimeetiquetaservice.environmentParaImprsessao ( numeroPedido, "PICKING" ).then(Function (result) {}); });
– cezar
Cezar thanks for the return, it worked but slowed down. Sorry for the ignorance but this process you indicated is similar to a recursive process ?. Thanks in advance.
– Pereira
It’s not about recursion but about omissions, you can get more information here: https://answall.com/a/119913/2318
– cezar