Skip to main content
avillanueva
23-Emerald I
23-Emerald I
March 21, 2012
Solved

API for setting effectivity

  • March 21, 2012
  • 1 reply
  • 1817 views
I am looking to mass set effectivity (Date Effectivity) across my system
. Is the correct API the following?

wt.effectivity.EffectivityHelper.setEffectivityTarget(wt.effectivity.Eff
ectivity effectivity, wt.effectivity.EffectivityHolder
effectivityHolder)



I would provide a version of a WTPart (holder) and an Effectivity
instance (WTDatedEffectivity), assuming that this method does the store
for me.



Another question, would I be responsible for providing the proper end
date when creating the WTDatedEffectivity? For example, if I had a part
with multiple revisions and I was setting effectivity on all of them,
when I apply the effectivity to version B after A was defined as
open-ended, would it update the end date of A to the start date of B?



Best answer by HelesicPetr

Hi @AJ_9942604 

Yes the API is still valid and works.

 

The requirement? Create own function with own code that set the effectivity by your rules. 

For example the date is set based on a last release date. 

 

PetrH

1 reply

7-Bedrock
June 28, 2023

Hello is this API still valid? How did you achieve your requirement?

HelesicPetr
22-Sapphire II
22-Sapphire II
June 29, 2023

Hi @AJ_9942604 

Yes the API is still valid and works.

 

The requirement? Create own function with own code that set the effectivity by your rules. 

For example the date is set based on a last release date. 

 

PetrH