Quintiq file version 2.0
#parent: ListInitElement
Response OnClick () id:Response_ListInitElement_MenuAddSequence_OnClick
{
  #keys: '[121114.1.2064513498]'
  Body:
  [*
    // Add Root Sequence
    
    initprocess := Dialog.Data();
    
    data := initprocess.LibWiz_InitElement( relshadow,
                                            LibWiz_InitSequence,
                                            Id := LibWiz_Wizard::GenerateId(),
                                            RootOfProcess := initprocess );
    dlg := construct( LibWiz_DialogInitSequence );
    dlg.Data( data );
    
    if( dlg.DoModal( ListInitElement ) > 0 )
    {
      data.Commit();
    }
  *]
  CanBindMultiple: false
  DefinitionID => /ListInitElement/Responsedef_ListInitElement_Menu_OnClick
  Initiator: 'MenuAddSequence'
  Precondition:
  [*
    // Can only be one root => enable only when it does not exist
    
    return guard( Dialog.Data().Roots( relsize ) = 0, false );
  *]
}
