AnsweredAssumed Answered

Shared Model Map

Question asked by Harshadm on Jul 19, 2018
Latest reply on Jul 20, 2018 by Harshadm

Hi,

 

I referred the documentation provided at this thread https://communities.ca.com/thread/119299345

@ Joel Nesmith, Srikanth Gajawada please help me here.

 

DevTest Version - 10.1 is being used

I am trying to implement the shared model map for one scenario.

 

Scenario:

There are 2 services getDetails and maintainDetails. These are part of same vsm file. Application invokes the services with the following sequence

getDetails 

maintainDetails

getDetails

First get call will display the accounts

User action add/delete invokes the maintainDetails service. Here I see the AccountNumber

Post that, there is get a getDetails that has the respective account linked or de-linked

 

Issue:

Here, I am trying to fetch Account number rom maintain and pick right response for #2 getDetails. But somehow it is not fetching the value, and picking up the first getDetails response.

 

Code Details:

The following code is added for ExecuteScript step in the vsm file.

maintainDetails -

Properties myProps = new Properties();

myProps.setProperty("smmMyMessage", testExec.getStateValue("prop_SomeMessage") );

SharedModelMap.putObject(“<myNamespaceHere>”, “<enterKeyValueHere>”, myProps);

 

getDetails -

Properties myProps = (Properties) SharedModelMap.getObject(“<myNamespaceHere>”,
“<enterKeyValueHere>”);

String myAccount = myProps.getProperty("smmMyMessage");

 

Kindly let me know whether I am missing something or is there any better way in which it can be achieved.

 

Thanks,

Harshad

 

 

 

Outcomes