Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

Setting Date Effectivity on bulk data is consuming lot of time

$
0
0

Currently working on a data-migration project where Legacy ERP data needs to be loaded as WTPart.

Created WTParts and the Structures using data dump.

 

Now trying to set Date Effectivity on the loaded parts with respect to the Parent Parts.

Have developed an utility with the help of PTC case CS59121 to load Data effectivity on bulk data.

 

sample code : 

----------------------------------------------------------------------------------------------------

EffManagedVersion[] effVers = new EffManagedVersion[1];

                                                  effVers[0] =wtpartLatest;

                                                  EffGroup effGroup;

                                                  String dateStartString = startDate;

                                                  Date datestart = sdf.parse(dateStartString);

                                                  Locale locale = new Locale("en-US");

                                                  startDate = WTStandardDateFormat.format(datestart,WTStandardDateFormat.WF_STANDARD_DATE_ONLY_FORMAT, locale,TimeZone.getTimeZone("GMT"));

                                                  effGroup = new EffGroup(null,wt.effectivity.WTDatedEffectivity.class,(startDate+"-").trim());

                                                  effGroup.setEffTypeModifier(EffTypeModifier.EXACT);

                                                  effGroup.setEffContext(wtpartParentmaster);

                                                  //EffGroupAssistant.appendEffGroups(effVers ,new  EffGroup[]{effGroup});

                                                  EffGroupAssistant.appendEffGroupsQuietly(effVers ,new  EffGroup[]{effGroup});

                                                  PersistenceHelper.manager.refresh(wtpartLatest);

----------------------------------------------------------------------------------------------------

 

While loading the Effectivity came to see that some WTParts are being used as BOM Components under n number of BOM Assemblies(WTParts).

It almost took 1 hour to update 170 objects.

 

Now it is consuming lot of time. Please help me in this regard.

 

 

Thanks,

Niranjan


Viewing all articles
Browse latest Browse all 3592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>