Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_SWF_DialogMessage_OnOK
{
  #keys: '[136682.0.1505407904]'
  Body:
  [*
    if (  DataHolderStepDefinition.Data().Size() >0 ) 
    {
      //Delete stepdefinition
      service := SWF_WorkflowDataset.Service();
      service.TR_BatchDeleteStepDefinition( DataHolderStepDefinition.Data() );
    }
    else if( DataHolderActivityDefinition.Data().Size() >0 )
    {
      // Delete activity definition
      service := SWF_WorkflowDataset.Service();
      service.TR_BatchDeleteActivityDefinition( DataHolderActivityDefinition.Data() );  
    }
    else if ( DataHolderDependencyStep.Data().Size() > 0 )
    {
      // Delete dependencies
      SWF_WorkflowDataset.Service().TR_BatchDeleteStepDefinitionDependency( DataHolderDependencyStep.Data() );  
    }
    else if ( DataHolderCycle.Data().Size() >0 )
    {
      // Delete cycles
      SWF_WorkflowDataset.Service().TR_BatchDeleteWorkflow( DataHolderCycle.Data() );  
    }
    else if ( DataHolderActivity.Data().Size() >0 )
    {
      // Delete activity
      service := SWF_WorkflowDataset.Service();
      service.TR_BatchDeleteActivity(  DataHolderActivity.Data() );
        
    }
  *]
}
