def run(self, data_service, project_file):
        """
        Attach a remote file to activity with used relationship.
        :param data_service: DataServiceApi: service used to attach relationship
        :param project_file: ProjectFile: contains details about a file we will attach
        """
        remote_path = project_file.path
        file_dict = data_service.get_file(project_file.id).json()
        file_version_id = file_dict['current_version']['id']
        data_service.create_used_relation(self.activity.id, KindType.file_str, file_version_id)
        self.activity.remote_path_to_file_version_id[remote_path] = file_version_id
def run ( self , data_service , project_file ) : remote_path = project_file . path file_dict = data_service . get_file ( project_file . id ) . json ( ) file_version_id = file_dict [ 'current_version' ] [ 'id' ] data_service . create_used_relation ( self . activity . id , KindType . file_str , file_version_id ) self . activity . remote_path_to_file_version_id [ remote_path ] = file_version_id
Attach a remote file to activity with used relationship.
        :param data_service: DataServiceApi: service used to attach relationship
        :param project_file: ProjectFile: contains details about a file we will attach