Requests & services (API and internals)
Section titled “Requests & services (API and internals)”This page is for integrators and developers who read or drive service requests from outside the portal, or who need to explain exactly why a user can or can’t see a request. It covers the data model, the access rules for each access mode, the single access endpoint, the system lists behind the portal’s request areas, and how the Request Status a user sees is computed.
The end-user view of the same features is Services & Submitting Requests. How to design a service’s workflow is in Workflows (Design).
The model
Section titled “The model”A service is a data entity of type Request whose meta.activated flag is
true. Only activated services ever reach the portal. Submitting a service creates
a request: an entry of that entity that carries a workflow.
When the entry is created, the platform starts the entity’s active workflow on its first step. A workflow must begin with an Entry step, and the owner of a main workflow’s Entry step is always the entry’s creator. So a newly saved request sits on the requester’s own step, with an empty step history, until the requester runs that step’s action (the designer names it, typically Submit). An approver who “returns” a request with a relative previous step action, or with the admin Return to step action, sends it back to that Entry step and therefore back to its creator. Inside a sub-workflow the Entry step instead mirrors the owner of the parent’s sub-workflow step.
Each request also has a lightweight tracking record in the system REQUEST
entity (see The request tracking record). The
portal’s request lists read those records, not the original entries.
Access modes
Section titled “Access modes”The portal splits request access into four modes. Each has its own portal area, its own access check and its own implicit (system-generated) views.
Mode (RequestAccessModeEnum) | Portal area (English label) | Route | Access check | Detail view (ViewImplicitType) | List views |
|---|---|---|---|---|---|
New | Services Catalog | /s | canCreateRequest | MY_REQUEST_DETAILS | SERVICE_CATALOG view of the SERVICES entity |
MyRequest | Outbox | /my | canAccessMyRequest | MY_REQUEST_DETAILS | ONGOING_MY_REQUESTS, COMPLETED_MY_REQUESTS |
Inbox | Inbox | /inbox | canAccessInbox | INBOX | ONGOING_INBOX, COMPLETED_INBOX |
Observer | Watching | /rm | canAccessObservers | OBSERVER | ONGOING_OBSERVER, COMPLETED_OBSERVER |
The four service actions are ServiceActionTypes submit, request, inbox and
observe. Each maps to a delegation permission pattern of the form
so:service:{serviceId}:{action} (see Delegation).
Older pages and the route keys still call Outbox “My Requests” and Watching “Request Monitoring”. The English UI labels are Outbox and Watching; the service list is Services Catalog.
The access endpoint
Section titled “The access endpoint”RequestController exposes one authenticated route:
GET /v1/requests/{entity}/{id}/{mode}entity: the service entity id.id: the request entry id, or the new-request placeholder.mode: aRequestAccessModeEnumvalue:New,MyRequest,InboxorObserver.
It requires the Auth2 authentication strategy. The handler carries
@authorize.skip(), because access is resolved by the per-mode checks below
rather than by the generic authorizer. It returns the implicit view (DataViews)
the caller is entitled to for that mode, or null if the caller may not access
it:
| Mode | Check performed | View returned |
|---|---|---|
New | canCreateRequest (audience) | MY_REQUEST_DETAILS |
MyRequest | canAccessMyRequest (you created it) | MY_REQUEST_DETAILS |
Inbox | canAccessInbox (owner, group or history) | INBOX |
Observer | canAccessObservers (observer lists) | OBSERVER |
Each implicit view is matched by
{dataEntity, isPublished: true, isImplicit: true, implicitType}
(ViewImplicitType values for requests: INBOX, MY_REQUEST_DETAILS,
OBSERVER, plus NONE). If the target entity is not of type Request, the
endpoint raises EntityNotOfTypeRequestException.
The portal calls this endpoint (as FetchServiceImplicitViewForRequest) in two
places:
- On a service’s page, it builds the New Request button (
action.NEW_REQUEST) only when theNewcall returns a view. No view, no button. - As a route guard on every request page. With no view the user is sent to
/unauthorized, except that a request opened from the catalog falls back to the service page.
Who can reach a request
Section titled “Who can reach a request”Submit: canCreateRequest
Section titled “Submit: canCreateRequest”When the portal builds a user’s navigable objects it calls
getUserServicesCanAccess, which filters the activated services down to the ones
canCreateRequest allows. The rule is:
- If the service is not
activatedor has noaudience, it is hidden. - If anonymous access is enabled (and the caller is not acting under a delegation): an anonymous-only service (anonymous enabled, authenticated not enabled) is hidden from signed-in users; otherwise it is shown.
- Any authenticated path needs a signed-in user (
sub). - If the authenticated audience is restricted, the user must appear in
entitledEntries, either directly by user id or through one of their groups. - Under a delegation, the result is then filtered by the delegation scope for
the
submitaction.
Because this is enforced server-side, a service the user can’t submit is simply absent from the catalog. There is no “request access” flow.
Outbox: canAccessMyRequest
Section titled “Outbox: canAccessMyRequest”The caller is the creator (creationInfo.doneBy equals their user id), or the
anonymous rule below grants access. Under a delegation the decision is the
delegation scope for the request action.
Anonymous access to a request (isAnonymouslyAccessibleRequest): an
unauthenticated caller may open a request only if it was created anonymously (its
creationInfo.doneBy names no user; missing metadata fails closed), and only while
every current workflow step is still unowned, that is, before the request has
been handed to a staff owner. A request with no current steps does not qualify.
An authenticated caller never qualifies through this rule.
Inbox: canAccessInbox
Section titled “Inbox: canAccessInbox”The creator is always excluded. A requester never reaches their own request
through the Inbox, not even when its current step is theirs (for example after it
was returned to them). They reach it through MyRequest, where the Request Status
shows Pending Your Action.
For everyone else, any one of these is enough:
- The user is the current step owner (
owner.dataEntry), or is in the current step’s list of original owners (array form). - The user belongs to a group that is an original owner of a current step,
and that step is unassigned or is an “all users” step
(
accessPermission === AllUsers). - The user belongs to a collection that is an original owner under the same unassigned / all-users condition.
- The user executed a step earlier in the request’s history (
executedBy), or was an owner at a past step. - The user was inside a group of owners on an all-users step in the history.
A request with no current steps is open to any authenticated non-creator. Under a
delegation the decision is the delegation scope for the inbox action.
Watching: canAccessObservers
Section titled “Watching: canAccessObservers”The user is listed in the service’s meta.observers.users, or belongs to a group
in meta.observers.groups. The portal only surfaces the Watching area for
services the user can observe (getUserServicesCanObserve), and the sidebar shows
it only when the user has ongoing or completed observed requests. Under a
delegation the decision is the delegation scope for the observe action.
Who can edit a request
Section titled “Who can edit a request”The edit route (/s/:serviceId/r/:requestId/edit) has its own guard. If the
request has a workflow, the user must be the current step owner, be able to take
ownership of the step, be able to execute the step’s workflow action (this covers
members of a group that owns a parallel step), or hold the view’s edit as admin
grant. Otherwise they are redirected to the read-only request page. This is what
lets a requester edit their own request only while it sits on their step.
Service audience model (ServiceMeta)
Section titled “Service audience model (ServiceMeta)”| Field | Type | Meaning |
|---|---|---|
audience.anonymous.enabled | boolean | Anonymous users may submit |
audience.authenticated.enabled | boolean | Signed-in users may submit |
audience.authenticated.isRestricted | boolean | Restrict to a named list |
audience.authenticated.entitledEntries | array | Users/groups allowed when restricted |
activated | boolean | Service is live (required for listing) |
category | string | Catalog category |
onBehalf | string | Field path used as the request’s subject |
observers.users / observers.groups | refs | Who may observe requests |
showServiceForEveryone | boolean | Catalog visibility toggle |
showServiceForAuthenticatedUsersOnly | boolean | Restrict catalog visibility to signed-in users |
On-behalf subject. When the tracking record is built, the “on behalf of” party
is read from the field named by onBehalf on the submitted data
(meta.onBehalf). If it is empty, it falls back to the request’s creator. This is
what the portal displays as the subject of the request.
Anonymous forms and human verification. A service whose audience allows anonymous access can be protected, view by view, by a proof-of-work human check. It is off by default. Each challenge is single-use. Signed-in users are never challenged. If the verification service is unavailable, the caller is treated as unverified and a form that requires verification is refused. The wire contract for driving such a form headlessly is in Writing Data; turning it on is in Human Verification.
The request lists
Section titled “The request lists”The portal’s Outbox, Inbox and Watching tabs are implicit views over the REQUEST
entity, each backed by an implicit query seeded at install. Two of them show the
rules that matter most:
- Ongoing Outbox (
ONGOING_MY_REQUESTS_QUERY):creationInfo.doneBy = @meandstatus.id != COMPLETED. A request that is waiting on its creator therefore stays here, with status Pending Your Action (or Draft if it was never sent on). - Ongoing Inbox (
ONGOING_INBOX_REQUESTS_QUERY):creationInfo.doneBy != @meand the current step is owned by@me, or is unowned / all-users and its original owner is in@myGroupsor@myCollections, or is an array of original owners that includes@me.
Drafts are a different thing from the Draft status. A form saved with
Save as Draft is an entry in the Draft state. It has no workflow yet and is
listed only through the Ongoing tab’s Drafts switch. The option is offered on a new
request (or an existing draft) only when the view’s
editConfiguration.allowCreateEntryAsDraft is on.
Live counts. The catalog subscribes to a socket channel
(subscribeToModifiedRequestsCounts) and refreshes the Ongoing/Completed counts as
requests change. All three lists receive step and status changes over the same
real-time connection. The sidebar’s service status reports ongoing counts and
whether each area has ongoing or completed requests, which decides whether the
Outbox, Inbox and Watching items are shown.
Delegation filtering of lists. While a user is delegating, an HTTP interceptor rewrites the query on the Service Catalog and on the Outbox / Inbox / Watching entry and count endpoints. See Delegation.
The request tracking record
Section titled “The request tracking record”Each ongoing or completed request is represented by a REQUEST-entity entry,
RequestDataEntryValue, built by RequestService.buildRequestEntry. It references
the original submission and carries the fields the portal lists show:
requestNumber,reference(original entity and entry),serviceReference.service(name, description, icon, category) andobservers.currentStep(name, owner, original owner, received-at, owner definition).onBehalf,creationInfo,updateInfo,entityVersion.lifeCycleStatus(LifeCycleStatusEnum):Active(0, in progress),Completed(1, finished normally),Failed(-1), or undefined (not in a workflow).isInvalid/invalidReason(DataEntryInvalidReasonEnum:Obsolete= 0,Invalid= 1).- Workflow metadata:
_metaCurrentSteps,_metaWorkflowHistory,_workFlowStepsHistory,_metaAdhocSteps,_metaOrder.
If a request has no active workflow, or no backing service entry can be found,
buildRequestEntry returns null and no tracking record is produced. The record is
rebuilt from the entry as currently persisted rather than from an event snapshot,
so concurrent updates can’t roll a list row back to an older step.
The current step and step history are taken from the active workflow instance
(metaCurrentStep.workflowId / instanceId). A request running a nested
sub-workflow therefore shows the sub-workflow’s step and owner, not the parent’s.
The computed Request Status
Section titled “The computed Request Status”The status field (Request Status) is an implicit, virtual category field whose
value is computed per viewer. The branches are evaluated in this order:
status.id | English label | Condition |
|---|---|---|
COMPLETED | Completed | lifeCycleStatus is Completed (1) or Failed (-1) |
OBSOLETE | Obsolete | invalidReason is Obsolete (0) |
DRAFT | Draft | The first workflow history has no executed steps yet |
PENDING | Pending Your Action | lifeCycleStatus is Active and the active step’s owner is the viewer, or the step is unowned / all-users and the viewer is in its original owners (directly, by group or by collection) |
ON_GOING | On Going | lifeCycleStatus is Active |
NONE | None | Anything else |
The Ongoing/Completed split of the lists follows status.id: Completed holds
COMPLETED, Ongoing holds everything else.
Earlier documentation listed the request statuses as Draft, Open, Completed and OnHold, with result values Succeeded, Failed, Rejected, Timedout, Cancelled and Obsolete. None of those values exist in the current code. The table above is the current set.
Notifications when a request reaches someone
Section titled “Notifications when a request reaches someone”When a service entity is created or updated, the reaction service adds an implicit
reaction to it: on WorkflowStepReached, send an in-app notification to the
current step owner, with the title Action Required and the text You have a new
request (notification type INCOMING_REQUEST_RECEIVED). This is how a requester
learns that a request was returned to their step, and how an approver learns that a
request arrived. Email or SMS on the same events are separate reactions the
designer adds.
Delegation
Section titled “Delegation”When a user acts under a delegation, access to submit, Outbox, Inbox and Watching is decided by the delegation’s scope instead of by the ordinary ownership rules:
- Scope is either
ALLOW_ALLorDENY_ALL. - Exceptions are patterns that carve holes in the scope. Global exceptions are
so:all,so:appandso:service. A per-service, per-action exception isso:service:{serviceId}:{action}, where the action issubmit,request,inboxorobserve. - Under
ALLOW_ALL, a matching exception denies the action. UnderDENY_ALL, a matching exception allows it.
The same logic filters the lists fetched while delegating. An HTTP interceptor
rewrites the query on the Service Catalog and on the Outbox / Inbox / Watching
entry and count endpoints: under ALLOW_ALL the excepted services are removed
(nin), and under DENY_ALL only the excepted services are kept (inq). All of
this happens server-side. The full delegation model is in
Delegation.
Portal routes
Section titled “Portal routes”| Route | Purpose |
|---|---|
/s | Services Catalog |
/s/:serviceId | Service page (details and New Request) |
/s/:serviceId/r/new | New request form |
/s/:serviceId/r/:requestId | View a request |
/s/:serviceId/r/:requestId/edit | Edit a request (guarded, see Who can edit a request) |
/my | Outbox (Ongoing / Completed) |
/inbox | Inbox (Ongoing / Completed) |
/rm | Watching (Ongoing / Completed) |
Request pages opened from a list use the list’s prefix, for example
/my/:serviceId/r/:requestId. A draft is opened with the ?d=true query
parameter.
The Services Catalog requests every entry the user can access in one call (limit
is set to the maximum safe integer and activePage is pinned to 0), so it has no
pagination. Only valid, non-obsolete service entries are shown.
Caching
Section titled “Caching”The set of activated services is cached once per tenant under the SERVICES
cache key, with the default cache expiry, so repeated catalog loads don’t re-query
every service. The value doesn’t depend on who asks: the per-user filtering
(canCreateRequest, canAccessObservers) runs on the cached list afterwards. A
change to an activated service entity deletes the key. (Older releases cached one
copy per user, under a key that included the user id.)
Behaviour history
Section titled “Behaviour history”These changes are summarised in Versions. The detail is kept here because it explains behaviour an integrator may still meet on older deployments.
- Sub-workflow-aware tracking records
Since 1.4. The tracking record takes the current step and step history from the active workflow instance, so requests in a nested sub-workflow list the correct step and owner rather than the parent’s. - Request list corrections
Since 1.4. These were also delivered to the 1.4, 1.6 and 1.8 lines as an update (first on 1.4) and are present in 1.10:- The Inbox Completed tab matches the user against the history of every workflow of the request, not only the one it ended in. An approver inside a sub-workflow of a request that then completed in its main workflow used to lose it from Completed. Known limit: a member of a group that could have acted on a group-owned step, but did not, still doesn’t see the request there.
- Tracking records whose current step or finished state had drifted are repaired, and a request that is reset or has just been created stays in step with its record.
- When a service’s observers change, its existing requests are updated too. A new observer sees earlier requests in Watching, and a removed observer stops seeing them.
- The Watching, Outbox and Inbox sidebar items appear when the area has ongoing or completed requests. Before, an area whose requests were all completed could vanish, because its completed count reused the ongoing list.
- Anonymous requesters can open their request details after submitting.
- Archiving a service cascades
Since 1.8. Archiving a service from the admin Services Catalog archives every active request already submitted for it, so they drop out of Outbox, Inbox and Watching at once. Restoring the service restores them. Before 1.8, archiving or restoring a service only changed the catalog listing, and submitted requests kept showing regardless of the service’s state. - Implicit request fields self-heal
Since 1.8. If aRequest-type entity’s field configuration loses its implicitrequestNumberorstatusfield (legacy data, or a system-driven update that bypassed implicit-field validation), the platform appends the missing fields on the next save, whether create or update. Before 1.8 the repair ran only on create, so an entity that lost these fields stayed broken.
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27