Showing results for 
Search instead for 
Did you mean: 

Setting Effectivity values of a ReleaseStatus.

Trying luck in the administrators forum...


I launched a code to set the "effectivity_text" property of a ReleaseStatus object, but it resulted in:


Exception in thread "main" Error Msg.: Property Effectivity is not modifiable.
Error Val.: Property Effectivity is not modifiable.


I am trying to set effectivity values for an item remotely using SOA, initially my plan was:

1) Obtain the revision

2) Obtain the StatusRelease Object I need

3) set its properties, specially its effectivity_text directly. 


The property is shown in the Properties window of the StatusRelease element from RAC. So the plan looked simple, obtain the Object, set its "effectivity_text" to the desired value and we are done. 1 and 2 work as expected but I am obtaining no properties at all in the ReleaseStatus object no matter the policy I use. Somehow effectivity related values are private to the class and cannot be accessed directly.


Any idea of how to set the effectivity values of a StatusRelease object from SOA code? Is EffectivityManagement service capable of doing it? Any hint? 


Re: Setting Effectivity values of a ReleaseStatus.


Good afternoon, Ramon_Talavera


I do not have much work with SOA, but I'll try to help you.
I think that it's not a good idea to try to set the effectivity_text property for the ReleaseStatus object because it is a runtime property. As far as I know, in order to assign applicability to object status, you need to create an Effectivity object and assign properties to it already. Try searching for a function that can create Effectivity objects. I do not know what version Teamcenter you are using, but according to the information from GTAC in Teamcenter 10, SOA had problems with setting the effectivity for status - there is no SOA API to do this

Re: Setting Effectivity values of a ReleaseStatus.

Hello Arthur 3,

I am not forcing myself to set effectivity_text field, all I am trying to do is to find a way to remotely set the effectivity values of a ReleaseStatus object from SOA. Lots of GETs can be found in the EffectivityManagement service, but just a single SET (setEffectivityConditions) wich does not offer me to feed it with a ReleaseStatus object and it is not overly documented in terms of explaining how to feed it with formulae and URLs.

I am using Teamcenter 10.1. I have found just a function capable of creating Effectivity objects (setEffectivityConditions, not overly documented though), but it does not return Effectivity Objects and I cannot determine how I would assign those objects to a specific existing status element.

The Rich Client (RAC) is doing it by means of **its own private SOA API**, EffectivityService, not available to the public, so the Rich Client is capable of remotely doing it by using propietary code... :/

Has this been solved in Teamcenter 11?

Any workaround?

Thank you.

Re: Setting Effectivity values of a ReleaseStatus.


Sorry, but at this moment I don't know the answers to these questions.

Re: Setting Effectivity values of a ReleaseStatus.


What about assigning effectivity value with classic TC JAVA API? Did you try this?

Re: Setting Effectivity values of a ReleaseStatus.

Good idea, 


Any code or documentation reference to help me in my journey? Would it be possible to run it outside of RAC?


Unfortunately I am somehow forced to use SOA as the code is external to the Rich Client. Editing effectivities should be a basic part of a PLM system that easily allowed external integration. If creating items,applying attributes and even assigning release status objects is possible under SOA I am asking myself why assigning effectivity values is so overly complicated or not even possible. Does Teamcenter 11 SOA package have an EffectivityService capable of assigning effectivity values of a ReleaseStatus object? 


Maybe, (I said maybe) it would be possible to create an ITK program that handled it from a BMIDE created service, but that would mean to create a fully code customization template that would block hot deployment and make testing a lot more complicated; it also would mean to fly low level, which is beautiful, but not highly recommended due to mountains and lightning posts. I would prefer having an elegant OTB SOA solution to perform this or definitively have the evidence that it is not possible on Teamcenter 10 and/or if it is possible from version 11.


Thank you :) 


Re: Setting Effectivity values of a ReleaseStatus.


May be it would be helpfull

Some Effectivity example(unit_range use) with classic TC CORE JAVA API (custom tc java plugin for RAC)


//get ReleaseStatus object


TCComponent related = target_item_rev.getRelatedComponent("last_release_status");
if(related !=null)
     TCComponentReleaseStatus release_status = (TCComponentReleaseStatus)related;
      if (related instanceof TCComponentReleaseStatus

            &&related.getProperty("object_name").equals("Your_status_name") )
                               TCComponentItem end_item = (TCComponentItem)item_type.find("end_item_id");
                               TCComponentEffectivityType eff_type =                                                                                                         TCComponentEffectivityType)session.getTypeComponent("Effectivity");

                               TCComponentEffectivity effectivity = eff_type.createFromUnits(release_status,end_item,unit_range);





where unit_range - as String (01-03 for ex.)

Re: Setting Effectivity values of a ReleaseStatus.

Hello alex_c,


Thank you very much for the code, it is a great example, but as you already know, it does not work on the server, but as a plugin on the RAC :/


I imagine what I have to do is create an ITK program to run on the server to do what I have in mind (I imagine that the C++ ITK API does have the functionality). After that, convert it to a custom service but that would limit the hot deployment of the template, which I value a lot.


Easy to tell, not easy to do. As far as I understand, this should be a SOA service offered by Teamcenter out of the box. RAC is using its own private TcEffectivityService internally.


Again, thank you :)

Re: Setting Effectivity values of a ReleaseStatus.

Hurray for Teamcenter 11!
Interface Effectivity
ServiceData editReleaseStatusEffectivity(Effectivity.EditRelStatusEffectivityInput[] input)




Re: Setting Effectivity values of a ReleaseStatus.


This is good :robotvery-happy:, it is possible that in some of the patches for Teamсenter 10 the same feature was added