Welcome Guest! Log in

Topic-icon Idea How execute mapping in the loop

More
26 Aug 2015 15:15 #1 by zineddine007
How execute mapping in the loop was created by zineddine007
Hello,
I want to execute a mapping loop with a condition of stop , I put a countdown script , if the value is greater than 0 I rerun mapping .

the process executes only once time !! , I do not know why when everything seems logical
I attached

a photo.

Thank you,

Zineddine
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Aug 2015 15:48 #2 by Thomas BLETON
Replied by Thomas BLETON on topic How execute mapping in the loop
Can you please share with us the content of the scripting action, and also the content of the execution condition ?

Please Log in or Create an account to join the conversation.

More
26 Aug 2015 16:18 #3 by zineddine007
Replied by zineddine007 on topic How execute mapping in the loop
The content of the scripting action 'MAJ_NIVEAU_A_TRAITER' is as follow:
**
var_niveau=${~/pintniveau}$;
var_niveau=var_niveau-1;
__ctx__.publishVariable("~/pintniveau",var_niveau);
**
The variable (pintniveau) is initialized with an int of value 5, the goal is to start with 5 and arrive to 0.

The two different conditions are : ** ${~/pintniveau}$>0 ** to the End else ** ${~/pintniveau}$>0 ** to rerun last mapping.

Please Log in or Create an account to join the conversation.

More
26 Aug 2015 17:07 #4 by Nicolas Verscheure
Replied by Nicolas Verscheure on topic How execute mapping in the loop
The condition to "End" action sould be "${~/pintniveau}$==0" ?
You have the same condition for the 2 links.

Please Log in or Create an account to join the conversation.

More
26 Aug 2015 17:15 #5 by zineddine007
Replied by zineddine007 on topic How execute mapping in the loop
Sorry, yes the condition to "End" action is "${~/pintniveau}$==0"

Please Log in or Create an account to join the conversation.

More
26 Aug 2015 17:52 #6 by Thomas BLETON
Replied by Thomas BLETON on topic How execute mapping in the loop
Maybe the issue comes from the "Triggering Behavior" of the links.
Make sure all the links that go to the mapping are "Not mandatory". Otherwise the next iterations will each incoming action to be executed again.

Please Log in or Create an account to join the conversation.