admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Quintiq file version 2.0
#parent: #root
Method StartIterations (LibOpt_Task task, LibOpt_TaskContextIterator context) as stream[JSON]
{
  Description:
  [*
    This method loops in the same transaction to start new iterations.
    It loops until `MaxParallel` iterations are running or earlier (depending on the iterator).
    The method `CanStartIteration` can be used to check this.
    Besides this check, there should always be another check, so we don't end up in an infinite (reactive) loop.
    
    The flow of the iterator is such that when the iterator is executed, it calls this method to create N iterations that are started in parallel (where N = `MaxParallel`).
    After any of these iterations finish, the `Operation` method is called again which in turn calls this method. If all is well, one more iteration is created.
    This continues until a certain stop criterion is met.
    
    This method needs to be overridden.
  *]
  IsAbstract: true
  TextBody: 'return stream[JSON]::Success();'
}