Question
Tata Consultancy Services
IN
Last activity: 2 May 2020 3:50 EDT
How to convert java object to pagelist in Activity
Hi,
I have written an java step in activity to get the list of operators. The list will return to the output param which is of type JavaObject. The format of the list is in Json. I want to loop through the list to get only active operators in the activity step after the java step. How can achieve this. Please find the attachments.
Java step:
List <PresenceRecord> results = tools.getPresenceService().queryPresence("A", clauses, PresenceQueryClause.STANDARD_CATEGORY); Map <String, PresenceRecord> fetchUsersResponseMap = new java.util.HashMap <String, PresenceRecord> (); for (PresenceRecord record: results) { fetchUsersResponseMap.put(record.getOperatorId(), record); oLog.debug("Testing" +results); } /* OperatorsPresenceMap params will be avaliable in param page */ tools.putParamValue("OperatorsPresenceMap", results);
I want to add another step to loop through the OperatorsPresenceMap parameter to map only the active operator
Could you please help me how to achieve this. Please find the output param result in the screen shot.