on 01-05-2017 10:30 AM
We have a requirement to fetch the data from SuccessFactor and store it into hashmap.
Hello Namesake :),
Note sure whether this query was closed, if not, please refer the below snippet to make use of the HashMaps in CPI using Groovy scripting.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
HashMap myHashMap = new HashMap<String,String>();
def pIdExternal = person_id_external; // this is the value you have received from parsing the incoming XML using Groovy Scripting.
myHashMap.put("MyKey_thisCanBePersonIdExternal","MyValue_thisCanBeAnyValueYouWantToStoreAgainstPIDExternal");
message.setProperty("myHashMap", myHashMap); return message; }
This hashmap and subsequent updates can be accessed via property call from any of the following nodes, even in branches with Parallel / Sequential multicasts.
Thanks,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Namesake :),
Note sure whether this query was closed, if not, please refer the below snippet to make use of the HashMaps in CPI using Groovy scripting.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
HashMap myHashMap = new HashMap<String,String>();
def pIdExternal = person_id_external; // this is the value you have received from parsing the incoming XML using Groovy Scripting.
myHashMap.put("MyKey_thisCanBePersonIdExternal","MyValue_thisCanBeAnyValueYouWantToStoreAgainstPIDExternal");
message.setProperty("myHashMap", myHashMap); return message; }
This hashmap and subsequent updates can be accessed via property call from any of the following nodes, even in branches with Parallel / Sequential multicasts.
Thanks,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sriprasad,
Thanks for Reply.
I am fetching the compound employee data from SuccessFactor and want to store the person_id_external into HashMap ArrayList .
Actually for validation purpose i am storing value into HashMap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aditya,
Could you please elaborate more on your requirement .Do you want to store the list of values coming in message mapping queue in ArrayList in message mapping or something else?
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.