manage-services

Define and implement OFBiz services with transactional integrity and REST export.

175|216|Updated Mar 5, 2017
One-click install
npx skills add https://github.com/apache/ofbiz-plugins --skill manage-services
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manage-services
Source: https://github.com/apache/ofbiz-plugins/tree/main/ai-agent-skills/manage-services
Command: npx skills add https://github.com/apache/ofbiz-plugins --skill manage-services

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide for defining, implementing, and managing business logic as reusable, transactional, and securely enforced OFBiz services.

Core Features & Use Cases

  • Service Definition: Create and register new services in services.xml.
  • Engine Selection: Choose the appropriate engine (entity-auto, groovy, java, group) for different logic types.
  • Transaction Management: Control transaction boundaries (use-transaction, require-new-transaction) and handle commit/rollback logic.
  • Security & Export: Implement authentication, authorization, and expose services via REST APIs.
  • Use Case: When developing a new feature that requires creating an order, charging a credit card, and sending a confirmation email, this skill guides you through defining these as separate, transactional services and orchestrating their execution.

Quick Start

Define a new service named 'createExample' using the entity-auto engine to create a record in the 'Example' entity.

Frequently Asked Questions about manage-services

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a new OFBiz service in services.xml?

To define an OFBiz service, you create an entry in the services.xml file specifying the service name, engine type like entity-auto or java, and required parameters. This registration makes the business logic available for execution and transaction management.

What is the difference between entity-auto, groovy, and java service engines in OFBiz?

The entity-auto engine handles automatic CRUD operations for entities without custom code, the groovy engine allows writing lightweight scripts for simpler logic, and the java engine is used for implementing complex, secure business logic requiring full transactional control.

How do I manage transactions and rollback in an OFBiz service?

You manage OFBiz service transactions using attributes like use-transaction and require-new-transaction in the service definition. This controls transaction boundaries and ensures proper commit or rollback strategies during synchronous or asynchronous execution.

Can I expose an OFBiz service as a REST API?

Yes, you can expose OFBiz services via REST APIs by configuring the export attribute in the service definition. This allows external systems to securely access and execute the defined business logic over HTTP.

How do I orchestrate multiple OFBiz services for a single business process?

You orchestrate multiple OFBiz services by using the group engine to define a service group. This allows you to compose separate transactional services, such as creating an order and sending an email, into a unified architectural execution flow.