Skip to content

Allow registering multiple InvoicedItemsProcessingService impls#1102

Open
labkey-adam wants to merge 3 commits intodevelopfrom
fb_pg_support
Open

Allow registering multiple InvoicedItemsProcessingService impls#1102
labkey-adam wants to merge 3 commits intodevelopfrom
fb_pg_support

Conversation

@labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Feb 14, 2026

Rationale

https://github.com/LabKey/kanban/issues/1577

We need to allow multiple modules to register a InvoicedItemsProcessingService impl. Provide a module at registration time and a container at retrieval time. Determine the impl to return based on active modules in the container.

Related Pull Requests

Copy link
Contributor

@labkey-martyp labkey-martyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you were ready for code review on this. We'll need register calls then in the client repos?

protected BillingTask(Factory factory, PipelineJob job)
{
super(factory, job);
_processingService = InvoicedItemsProcessingService.get(job.getContainer());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to use EHR_BillingManager.get().getBillingContainer(getJob().getContainer());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to use EHR_BillingManager.get().getBillingContainer(getJob().getContainer());

Okay, I'll make that change. Not needed in EHR_BillingController.java?

Does relying on the registration module being active in the billing container make sense to you? IMO, this is more reliable than using folder type (which the old comment had suggested).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah probably should use the billing container as described above in the controller too. I don't think it will matter on a production server, but will probably matter on our test servers.

I think using the active modules in that container makes sense for production and test. Production will probably set that module property site wide, but tests will need to set it at the container level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I should probably just move the EHR_BillingManager.get().getBillingContainer() call into get()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...except that the interface can't see the manager. So never mind.

@labkey-adam
Copy link
Contributor Author

Not sure if you were ready for code review on this. We'll need register calls then in the client repos?

Yes, this PR references PRs in WNPRC and TNPRC that adjust registration. I've assigned you as reviewer to those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants