Quintiq file version 2.0
#parent: mbMainMenu/MenuFindPeggingCircularity
Response OnClick () id:Response_mbMainMenu_MenuFindPeggingCircularity_OnClick
{
  #keys: '[110880.6.1270944478]'
  Body:
  [*
    // Find circularity in processes which causes circularity in pegging
    
    processes := construct( Process_MPs );
    string := MacroPlan.FindPeggingCircularity( processes );
    
    // Opens the view related to an Assumption
    opened := ApplicationScope.ViewManager().OpenView( "Pegging circular" );
    
    if( opened )
    {
      lanes := selectset( processes, Elements.astype( LaneLeg ).Lane, lane, true );       // LaneLeg is the detail list of lane. Thus, it should shown in the list to show the lane legs.
      processes := processes.Union( lanes );
      DataHolderProcessesForPeggingCircular.Data( &processes );      // The filter is stored in the view itself
    }
    
    MessageBox::Information( ApplicationLibMacroPlanner, string, '&OK' );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_Menu_OnClick'
}
