Web / Apache OFBiz Interview questions
Explain the execution flow of a synchronous service call in OFBiz?
A synchronous call runs to completion and returns its result map before the caller continues - used whenever the caller needs the outcome immediately, such as validating a form submission.
sequenceDiagram
participant Caller
participant Dispatcher
participant Engine as Service Engine
participant Impl as Implementation
participant SECA
Caller->>Dispatcher: runSync("serviceName", params)
Dispatcher->>Engine: validate params against ModelService
Engine->>Engine: check permissions
Engine->>Engine: start or join transaction
Engine->>Impl: invoke (Java/simple-method/Groovy)
Impl-->>Engine: result map
Engine->>SECA: fire matching SECA rules
Engine-->>Dispatcher: result map
Dispatcher-->>Caller: result map
If any step throws an error or the implementation returns an error response code, the transaction is rolled back (unless it was already running before the call as part of an outer caller's transaction), and the error propagates back to the caller inside the result map rather than as a raw exception in most cases.
More Related questions...