Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method SetDialogComponentForDelegate ( 
 | 
  SWF_ActivityBase origin_activity, 
 | 
  shadow[SWF_ActivityBase] new_activity, 
 | 
  Boolean is_forward 
 | 
) id:Method_SWF_DialogCreateEditActivity_SetDialogComponentForDelegate 
 | 
{ 
 | 
  #keys: '[113694.2.1191149943]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Set dialog component for delgate forward/reply/close 
 | 
    name_prefix := ifexpr( is_forward,  
 | 
                           SWF_Translation::TRANSLATE_PrefixForwardActivityName(),  
 | 
                           SWF_Translation::TRANSLATE_PrefixReplyActivityName() );                                       
 | 
    name := name_prefix + origin_activity.Name(); 
 | 
    description := SWF_Workflow::GetDefaultForwardedDescription( origin_activity ); 
 | 
     
 | 
    //new_activity; // Workaround for shadow scope 
 | 
    new_activity.HasParentStep( origin_activity.HasParentStep() ); 
 | 
    new_activity.ParentStep( relset, origin_activity.ParentStep() ); 
 | 
    new_activity.Name( name ); 
 | 
    new_activity.Description( description ) 
 | 
    new_activity.DueDateHasManual( true ); 
 | 
    new_activity.DueDateManual( origin_activity.DueDate() ); 
 | 
    new_activity.IsDefaultOpen( origin_activity.IsDefaultOpen() ); 
 | 
     
 | 
    if( not is_forward ) 
 | 
    { 
 | 
      new_activity.AssignedAuthorization( relset, origin_activity.Creator() ); 
 | 
    }   
 | 
     
 | 
    // Enable/Disable dialog component for delgate actions 
 | 
    LabelAssignedTo.Enabled( is_forward ); 
 | 
    SWF_StringSelectionManagedBy.Enabled( is_forward ); 
 | 
  *] 
 | 
} 
 |