Correlate Java scripts

Automatic correlation is not supported in Java protocols, but you can manipulate script objects like any Java object.

For example: Given this business logic class:

public class RmiMessage implements Serializable {

    List<Integer> integers;

    public RmiMessage(List<Integer> myIntegers) {

        this.integers = myIntegers;

    }

    public void setIntegers(List<Integer> myIntegers) {

        this.integers = myIntegers;

    }

}

And given the following code in Action.java:

String _string9 = "com.comp.lr.testing.rmi.RmiMessage __CURRENT_OBJECT = {"

        + "java.util.List myIntegers = {"

             + "super = {"

                  + "super = {"

                  + "}"

                  + "int modCount = #0#"

             + "}"

             + "java.lang.Object a[] = {"

                  + "java.lang.Integer a[0] = {"

    + "super = {"

    + "}"

    + "int value = #4#"

                  + "}"

                  + "java.lang.Integer a[1] = {"

    + "super = {"

    + "}"

    + "int value = #21#"

                  + "}"

             + "}"

        + "}"

     + "}";

RmiMessage _message = (com.comp.lr.testing.rmi.RmiMessagelr.deserialize(_string9, 2);

_remote.exampleMethodCall(_message);

After the call to lr.deserialize, you have the business logic object, which can then be manipulated.

In this example, correlation is done by setting the integers list:

RmiMessage _message = (com.comp.lr.testing.rmi.RmiMessage) lr.deserialize(_string9, 2);

_message.setIntegers(Arrays.asList(4,5,7)); // call business logic methods here to adjust object to your needs

_remote.exampleMethodCall(_message);

Back to top