- ${session} = Resolve_Http_Session_For_Member member_index=${member_index}
- ${data} = TemplatedRequests.Get_As_Json_From_Uri uri=${ENTITY_OWNER_URI} session=${session} http_timeout=${http_timeout}
- ${candidate_list} = BuiltIn.Create_List
- ${json} = RequestsLibrary.To_Json ${data}
- ${entity_type_list} = Collections.Get_From_Dictionary &{json}[entity-owners] entity-type
- ${entity_type_index} = Utils.Get_Index_From_List_Of_Dictionaries ${entity_type_list} type ${type}
- BuiltIn.Should_Not_Be_Equal_As_Integers ${entity_type_index} -1 No Entity Owner found for ${type}
- ${entity_list} = Collections.Get_From_Dictionary @{entity_type_list}[${entity_type_index}] entity
- ${entity_index} = Utils.Get_Index_From_List_Of_Dictionaries ${entity_list} id ${id}
- BuiltIn.Should Not_Be_Equal_As_Integers ${entity_index} -1 Id ${id} not found in Entity Owner ${type}
- ${entity_owner} = Collections.Get_From_Dictionary @{entity_list}[${entity_index}] owner
- BuiltIn.Should_Not_Be_Empty ${entity_owner} No owner found for type=${type} id=${id}
- ${owner} = String.Replace_String ${entity_owner} member- ${EMPTY}
- ${owner} = BuiltIn.Convert_To_Integer ${owner}
- ${entity_candidates_list} = Collections.Get_From_Dictionary @{entity_list}[${entity_index}] candidate
- : FOR ${entity_candidate} IN @{entity_candidates_list}
- \ ${candidate} = String.Replace_String &{entity_candidate}[name] member- ${EMPTY}
- \ ${candidate} = BuiltIn.Convert_To_Integer ${candidate}
- \ Collections.Append_To_List ${candidate_list} ${candidate}
- Collections.Sort_List ${candidate_list}
- BuiltIn.Comment TODO: Separate check lines into Verify_Owner_And_Candidates_For_Type_And_Id
- BuiltIn.Run_Keyword_If """${require_candidate_list}""" BuiltIn.Should_Be_Equal ${require_candidate_list} ${candidate_list} Candidate list does not match: ${candidate_list} is not ${require_candidate_list}
- [Return] ${owner} ${candidate_list}