06-24-2017 06:27 PM
Hello All.
i'm attempting to update a pod customerId UUID value.
in the below example, i get the interesting customer and pod objects, i attempt to update the pod object with the UUID of the customer object, then get the pod object from context service. however, my pod is not updating with customerId UUID.
Code:
// get customer
Customer customer = contextServiceClient.get(Customer.class, "e72a2190-593b-11e7-844a-4d1470731c75");
System.out.println("Customer: " + customer.getLogString());
// get pod
Pod pod = contextServiceClient.get(Pod.class, "f38ff160-5942-11e7-b26d-47831111becf");
System.out.println("Pod: " + pod.getLogString());
/// update pod CustomerId value
pod.setCustomerId(customer.getCustomerId());
// get pod
pod = contextServiceClient.get(Pod.class, "f38ff160-5942-11e7-b26d-47831111becf");
System.out.println("Pod: " + pod.getLogString());
Output:
* as you can see the customerId: is null in both console outputs.
Before Update:
Pod: POD key: f38ff160-5942-11e7-b26d-47831111becf, refUrl: /context/pod/v1/id/f38ff160-5942-11e7-b26d-47831111becf, customerId: null, state: active, mediaType: null, requestId: null, contributors: [com.cisco.thunderhead.Contributor@3a574a3b[contributorType=machine,username=6e6f651b-1631-4616-9a5e-7a5ddde69f20,id=<null>]], fieldsets: [cisco.base.pod], workgroups: {production=[{keyId=https://encryption-a.wbx2.com/encryption/api/v1/keys/f391fcdb-3e91-4230-8802-151c089f6659, encryptedSCR=***}, {keyId=https://encryption-a.wbx2.com/encryption/api/v1/keys/f391fcdb-3e91-4230-8802-151c089f6659, encryptedSCR=***}]}, tags: [], dataElements: [dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string], created: 2017-06-25T01:09:34.710Z, lastUpdated: 2017-06-25T01:09:34.710Z, dataEnc: *****, piiDataEnc: *****
After Update
Pod: POD key: f38ff160-5942-11e7-b26d-47831111becf, refUrl: /context/pod/v1/id/f38ff160-5942-11e7-b26d-47831111becf, customerId: null, state: active, mediaType: null, requestId: null, contributors: [com.cisco.thunderhead.Contributor@5418893c[contributorType=machine,username=6e6f651b-1631-4616-9a5e-7a5ddde69f20,id=<null>]], fieldsets: [cisco.base.pod], workgroups: {production=[{keyId=https://encryption-a.wbx2.com/encryption/api/v1/keys/f391fcdb-3e91-4230-8802-151c089f6659, encryptedSCR=***}, {keyId=https://encryption-a.wbx2.com/encryption/api/v1/keys/f391fcdb-3e91-4230-8802-151c089f6659, encryptedSCR=***}]}, tags: [], dataElements: [dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string], created: 2017-06-25T01:09:34.710Z, lastUpdated: 2017-06-25T01:09:34.710Z, dataEnc: *****, piiDataEnc: *****
any guidance or suggestions welcome!
Regan
Solved! Go to Solution.
06-25-2017 10:33 AM
resolved.
at after setting the pod customerId, needed to call update on the context service client update on the pod.
contextServiceClient.update(pod);
Regan
06-25-2017 10:33 AM
resolved.
at after setting the pod customerId, needed to call update on the context service client update on the pod.
contextServiceClient.update(pod);
Regan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide