Nextedy POWERSHEET server-rendered properties execute inside an Apache Velocity template engine on the Siemens Polarion ALM server.
Server-rendered properties let you compute read-only column values that depend on data outside the current work item — related items, project metadata, repository information, or the current user’s permissions. Configure them via the serverRender key in the domain model YAML and display them in sheet columns marked as read-only.
The static context is built once and stored in a cached base context object. All platform service references are then reused across every template evaluation without re-initialization, which keeps rendering fast even for large sheets.
Work item queries, Lucene searches, project metadata
Provides access to work item queries, project-level tracker metadata, and Lucene search operations. This is the most commonly used platform service in server-rendered properties because it enables cross-item lookups and data aggregation across the project.
Lucene queries inside serverRender execute once per row in the sheet. On a sheet with 500 work items, a single Lucene query in a server-rendered column runs 500 times. Keep queries simple and avoid them on large datasets. Test on a filtered subset first.
Provides access to Polarion transaction management. In the context of server-rendered properties, templates execute within a read-only evaluation context. The transaction service is primarily useful for understanding the execution context rather than performing write operations.
The $txService variable is available in all templates. Its available methods depend on the Polarion server version. Consult the Polarion API documentation for the ITransactionService interface. Server-rendered expressions should not use this service to initiate write transactions — they run in a read-only evaluation context.
Provides access to repository-level operations: project metadata, user information, roles, and repository configuration. Useful for templates that need to display data from outside the current work item’s project scope or that need to resolve user or role information.
Available methods depend on the Polarion server version. The repository service provides read-only access to repository-level resources. Consult the Polarion API documentation for IRepositoryService.
Permission checks, role-based visibility, user identification
Enables permission checking, role-based visibility, and user identification within templates. Use this service to conditionally render content based on the logged-in user’s identity or to verify access rights before displaying sensitive data.
Combine $securityService with conditional Velocity logic to build columns that display different content depending on the current user’s role or permissions. The rendered value is computed server-side, so the user cannot bypass the check client-side.
In addition to the static platform services, the server renderer injects per-item variables for each work item during evaluation. These are documented in detail on the Context Variables page. The summary:
Legacy Polarion API. Only available for work item entities. Use for: $wi.getCustomField("fieldId"), $wi.getLinkedWorkItems()
$tx
Transaction
Current transaction context. Templates see the transaction state at evaluation time
$module
IModule
Document (LiveDoc) containing the work item. null for entities outside a document. Properties: .moduleFolder, .moduleName, .space
$context
PowersheetContext
Server API context with project scope and query capabilities
Prefer $item (ModelObject) for accessing standard work item properties. Use $wi (IWorkItem) only when you need methods not available on $item, such as getCustomField() or getLinkedWorkItems(). The $wi variable is only set for work item entities — it is null for non-work-item entity types.
When a Velocity template evaluation fails, the server renderer returns the constant error marker:
#SERVER_RENDER_ERROR
If this value appears in a sheet column, the serverRender expression for that property contains an error. Check the Polarion server logs for one of these exceptions:
Exception
Cause
ParseErrorException
Invalid Velocity syntax in the template (mismatched directives, bad variable references)
MethodInvocationException
A method call on a service or object threw an exception (null pointer, permission denied, invalid argument)
ResourceNotFoundException
A referenced Velocity resource (macro, include file) does not exist
IOException
I/O failure during template processing
The #SERVER_RENDER_ERROR marker is the only client-visible indicator of a problem. To diagnose the root cause, check the Polarion server logs (logs/polarion*.log) where the full stack trace is logged with the template pattern and exception details. Common causes include referencing a null property without an #if guard, calling a method with the wrong argument type, or using incorrect Velocity syntax.
Server-rendered properties are configured in the domain model YAML using the serverRender key on a property definition. The value is an Apache Velocity template that is evaluated for each work item when the sheet loads.
The following domain model and sheet configuration demonstrate all four platform services used in server-rendered properties within a standard RTM entity type.Domain model YAML:
Server-rendered properties are always read-only in the sheet. The serverRender value is computed on each query and cannot be edited by the user. Mark the corresponding sheet columns with isReadOnly: true to communicate this in the UI.