Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod ValidateInput ( 
 | 
  output String feedback_o, 
 | 
  SWF_WorkflowDefinition owner, 
 | 
  SWF_StepDefinition stepdefinition, 
 | 
  String name, 
 | 
  String dueoffset, 
 | 
  String managedby 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'Validate inputs for step definition' 
 | 
  TextBody: 
 | 
  [* 
 | 
    result := true; 
 | 
     
 | 
    if( name = '' ) 
 | 
    { 
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_MustHaveAName( ); 
 | 
    } 
 | 
    else if( dueoffset = '' ) 
 | 
    {  
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_IsEmptyDueOffset(); 
 | 
    } 
 | 
    else if ( not ( dueoffset.Regex( "^\d*$" ) ) ) 
 | 
    { 
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_StepDefinition_InvalidDueDateOffset(); 
 | 
    } 
 | 
    else if ( dueoffset.Regex( "^-+\d*" ) ) 
 | 
    { 
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_StepDefinition_NegativeDueDateOffset(); 
 | 
    } 
 | 
    else if( managedby = SWF_AuthorizationBase::GetStringSelectionSeparator() ) 
 | 
    { 
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_InvalidManagedBy(); 
 | 
    } 
 | 
    else if( exists( owner, StepDefinition, e,  
 | 
                     e <> stepdefinition, 
 | 
                     e.Name() = name ) ) 
 | 
    { 
 | 
      result := false; 
 | 
      feedback_o := SWF_Translation::TRANSLATE_NameAlreadyExists();  
 | 
    } 
 | 
     
 | 
    return result; 
 | 
  *] 
 | 
} 
 |