Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Publishing cxId to DTR #483

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,18 @@ public MaterialPartnerRelation create(MaterialPartnerRelation materialPartnerRel

/**
* Call this method when a partnerCXId for a Material was needed but not found.
* This method will trigger a new PartTypeInformation Task for any material that
* the given partner supplies, but still misses a partnerCXId.
* This method will trigger a new Task for any material that
* the given partner supplies, but still misses a partnerCXId. This task will
* try to fetch the partner's CX Id for all materials that this partner supplies
* and where this partner's CX Id is still unknown.
*
* This method will block until all tasks have finished, if any.
* <p>
* Please consider that calling this method can only bring any meaningful results, when
* the corresponding material entity is properly registered and there exists a
* MaterialPartnerRelation for the given material and the given partner, where the
* partner is designated as supplier. I.e. please make sure to always keep your masterdata
* entities up-to-date.
*
* @param supplierPartner The supplier partner
*/
Expand All @@ -104,7 +112,7 @@ public void triggerPartTypeRetrievalTask(Partner supplierPartner) {
.stream()
.filter(mpr -> mpr.getPartnerCXNumber() == null)
.filter(mpr -> !currentPartTypeFetches.contains(mpr))
.map(mpr -> executorService.submit(new PartTypeInformationRetrievalTask(mpr, 1)))
.map(mpr -> executorService.submit(new DtrRegistrationTask(mpr, 1)))
.toList();
if (futures.isEmpty()) {
return;
Expand Down
Loading