Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Idea How execute mapping in the loop

More
26 Aug 2015 15:15 #1 by zineddine007
zineddine007 created the topic: How execute mapping in the loop
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:
More
26 Aug 2015 15:48 #2 by Thomas BLETON
Thomas BLETON replied the 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 ?
More
26 Aug 2015 16:18 #3 by zineddine007
zineddine007 replied the 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.
More
26 Aug 2015 17:07 #4 by Nicolas Verscheure
Nicolas Verscheure replied the 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.
More
26 Aug 2015 17:15 #5 by zineddine007
zineddine007 replied the topic: How execute mapping in the loop
Sorry, yes the condition to "End" action is "${~/pintniveau}$==0"
More
26 Aug 2015 17:52 #6 by Thomas BLETON
Thomas BLETON replied the 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.