Quintiq file version 2.0
#parent: #root
Method Edit () id:Method_SWF_DialogCreateEditStepDefinition_Edit
{
  #keys: '[136682.0.982345376]'
  Body:
  [*
    service := SWF_WorkflowDataset.Service();
    data := DataHolderDialogData.Data();  
     
    selectedelement := this.GetSelectionAuthorizationElement();
        
    selected_authorization := SWF_AuthorizationBase::GetSelectedAuthorizationFromStringSelections( SWF_WorkflowDataset,
                                                                                                   selstrManagedBy.Text(),
                                                                                                   selectedelement );
                                                                                                 
    parentstep := guard( selParentStepDefinition.Data(), null( SWF_StepDefinition ) );
    
    service.TR_CreateUpdateStepDefinition( guard( data.ID(), Key::ZeroKey() ),
                                           edtName.Text(),
                                           [Number]numpickerduedoffset.Number(),
                                           selstrIcon.Text(),
                                           guard( parentstep.ID(), Key::ZeroKey() ),
                                           guard( selected_authorization.DisplayName(), '' )
                                         );
  *]
}
