Dexels / navajo

Navajo Service-oriented Applications
GNU Affero General Public License v3.0
9 stars 5 forks source link

Make a simple loop implementation for Navascript #613

Closed aschoneveld closed 2 years ago

aschoneveld commented 2 years ago

like 'block' has been introduced to prevent usage of a message with a condition to create a conditional piece of navascript, a proper 'loop' should be introduced to prevent usage of array message with mode=ignore or multipleemptymap adapter. In NS3 syntax it should work as follows:

map.navajomap {
   .callwebservice(name='somewebservice');
   $messagePointer = 'ResultMessage';
   loop $messages {

   }
}

or:

loop [/SomeInputArrayMessage] {

}

This last construct works in NS3. It uses multipleemptymap under the hood. However it should be supported by TslCompiler directly as a for loop construct.

aschoneveld commented 2 years ago

This is working

aschoneveld commented 2 years ago

see #271, #235, #243

kharybdys commented 2 years ago

@aschoneveld Considering #243, how does a loop over all the options of a selection property look like in NS3? And then you should use a filter if you only want the selected options? Because apparently when the issue was made the default behaviour was to only loop over the selected options...