Passing in name of record and returning full record structure

I have a record name that continues to change on the fly.
However, I have a fixed record structure that needs to be named with the ever changing record name. For example…
the record name is tempinventory4
It looks like the following
-InventoryOnSite…a record
-InventoryInTank …a recordlist
-MeasurementInformation…existing record
-SpecifiedMeasurement …a record
-@MeasureQualifier …a text string attribute
-DateTime …a record
-T *body

Now the name will change to tempinventory4 or 5 or 6 or 1 or MDI etc…
so, I need a service, or something, perhaps a Java service that I can pass in the new name of the record and get back the record structure with the new name…Someone suggested I could use documentToRecord…
Is this true???

Using just flow:

Step 1: Create a boundNode record with field called @version and set it’s value to 1.0

Step 2. Call recordToDocument and set the parameters as:
boundNode = the boundNode record you created in Step 1
recordName = the name of the record you want to create that you already have defined as a record in IS
generateRequiredTags = true

This creates an xml string that has all the required tags of your record.

Step 3: Call stringToDocument and set the parameters as:
xmldata = the xmldata that was produced in Step 2

Step 4: Call documentToRecord and set the parameters as:
node = the node that was created in Step 3
makeArrays = false
recordName = the same recordName used in Step 2

This creates a boundNode Record with all the non optional fields and records of the recordName that you specified. Any optional fields will not be in this structure.

Hi Thomas,

     In your step 2, you mention recordName = the name of the record.But Edwards posting he told us name of the record dynamically 

changing.That means his root node of the record changing dynamically
say e.g tempinventory4 to tempinventory5…bla…bla.So record
reference root node is changing dynamically.Then your steps
works us pl think of.I think he has to write java service
which he has to take rootnode string as input Record structure
as out put.That record structure comes under record which
has dynamiccaly changing root name record.


The name may be dynamically changing but it must be a known IS record or the structure would not be known. recordName just accepts a string, so as long as the record is defined within IS, this parameter can be set at run time by just passing in the correct record name.

If the structure is identical, but just the root name needs to be replaced a simple string substitution is all that is needed.

And what it really all comes down to is how the record itself is created. Is it defined with a root node or not because that will determine how recordToDocument spits out the xmldata.

Hi Thomas,

     Thanks for your reply.I am not tried this.May be I am wrong.