Introduction
I know it’s simple to create
Object initialize Object and assign data to Object in IBM® Business Process
Manager. But sometimes we might forget or get confuse, so I thought to publish
as a post here.
Here I am going to describe
two scenarios.
v First is Complex Object initialization and assign
data.
v Second is Complex Object initialize as list and assign
data.
Complex Object initialization and assign data.
Here I am taking Customer as
Complex object. This I am going to initialize and assigning data.
//Initialize Customer Object
tw.local.customer = new
tw.object.CustomerBO();
//Assign data to Customer
Object
tw.local.customer.customerID =
"C123";
tw.local.customer.customerName
= "Jhon T";
tw.local.customer.customerType
= "SA";
tw.local.customer.address =
"USA";
Second is Complex Object initialize as list and assign
data.
Here I am taking Address as
Complex object. This I am going to initialize as list and assigning data.
//Initialize
Adddress Object list
tw.local.address
= new tw.object.listOf.AddressBO();
//Initialize
Adddress Object for initial position
tw.local.address[0]
= new tw.object.AddressBO();
//Assign
data to Customer Object at initial position
tw.local.address[0].addressType
= "Home";
tw.local.address[0].houseNo
= "H1-123";
tw.local.address[0].street
= "London
Street";
tw.local.address[0].city
= "Mangalore";
tw.local.address[0].country
= "India";
tw.local.address[0].ZIP
= "575001";
//Initialize
Adddress Object for next position
tw.local.address[1]
= new tw.object.AddressBO();
//Assign
data to Customer Object at next position
tw.local.address[1].addressType
= "Office";
tw.local.address[1].houseNo
= "H2-321";
tw.local.address[1].street
= "KS Rao
Road";
tw.local.address[1].city
= "Mangalore";
tw.local.address[1].country
= "India";
tw.local.address[1].ZIP
= "575001";
0 comments :
Post a Comment