set myAddress = addressAsJSONDocument.jsonToClass();
The action script below creates an object of type Address. An output object flow state named myAddress of type Address needs to be defined in the activity diagram.
create myAddress;
set myAddress = addressAsJSONDocument.jsonToClass();
The example below shows how to specify the xUML type at runtime, e.g. if using a derived class.
{
"e2e:type":"urn:json.e2e.ch.AddressWithEmail",
"name":"John Snow",
"company":"Winter & Partners",
"mailaddress":"john.snow@winter.com"
}
The xUML type is declared by the attribute "e2e:type
". The type has to be specified like <xml_namespace>.<classname>