Hi all,

As I am working on Manufacturing related APIs for the Manufacturing
application, covering areas such as BOM, routing, production runs and MRP,
and I would like to confirm the preferred approach before finalizing the
patches.

The proposed approach is to add REST API definitions in the Manufacturing
component and expose the required services from the component itself. This
would include:

   - adding new read/fetch services with export="true" for REST API usage,
   - adding explicit permission-service definitions to those exported
   services,
   - changing a small number of existing mutation services to export="true" so
   they can be used by REST APIs,
   - adding permission services to those existing mutation services as well.

The intent is to keep the REST API close to the application component that
owns the business behavior, instead of creating a separate layer outside
the component for these APIs.

For example, in Manufacturing this could mean services for BOM, routing,
and MRP workflows are defined and secured in Manufacturing service
definition files, with REST mappings in applications/manufacturing/api/....

Since OFBiz application components do not currently have much REST API code
directly inside them, I wanted to ask whether this is an acceptable
direction for upstream contributions.

The questions I would like to confirm are:

   1. Is it acceptable to introduce REST-facing services with
export="true" directly
   in an application component such as Manufacturing?
   2. Is it acceptable to mark existing application services as
   export="true" when they are intended to be called through REST, provided
   we also add explicit permission services?
   3. I plan to add read/fetch services used by REST/UI workflows directly
   in the owning application component. Does this align with OFBiz’s preferred
   component boundaries?
   4. Are there any concerns with adding api/*.rest.xml descriptors
   directly under application components?
   5. Is there anything else I should account for before adding the first
   component-owned REST API contribution?

My current thinking is that this should be okay as long as the services are
component-owned, explicitly permissioned, and reuse existing OFBiz business
logic rather than bypassing it. But I wanted to check with the community
before proceeding further.

Thanks

--
Divesh Dutta

www.hotwaxsystems.com

Reply via email to