Cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA API and Naming Rule for item_id

Legend
Legend

How to use item_id generation when Naming Rule appied with TC JAVA API( or may be SOA) ?

 

I have a naming rule with 2 patterns for example:

 

A-nnnnnn

B-nnnnnn

 

I use Java API function tccomponent_item_type.create(item_id,rev_id,item_type, item_name,item_desc,uom_tag)

 

If we need item_id generated by TC we just set item_id parameter as NULL.

But how to get new Item_ID if the Naming Rule with two patterns exist for this item?

3 REPLIES

Re: JAVA API and Naming Rule for item_id

Solution Partner Legend Solution Partner Legend
Solution Partner Legend
In SOA C# we use API "DataManagementService.GenerateItemIdsAndInitialRevisionIds". (Should be similar in Java)
But I have not tested how this works in case of naming rules.

Re: JAVA API and Naming Rule for item_id

Legend
Legend

Hello,

 

I havent tried it but this SOA API DataManagementService.getNextIds can be used for generating ID based on pattern

Before using this API, you will have to find the naming rule associated with the ITEM_ID property for that business object type. Pattern is also one of the arguments to the getNextIds API.

 

So i believe, you can generate your next ID with right input parameters

Once you have the new ITEM_ID generated, you can use it in your create API

 

Regards

Mahendra

Re: JAVA API and Naming Rule for item_id

Legend
Legend

Yes, the SOA getNextIds method solved this problem