Enable REST Services¶
The AristaFlow Services provide most of its API also as REST services.
Please check here for a general introduction to the system configuration files. The relevant config entries are to be made in the ADEPT2.properties.
Server¶
LicenceManager.ExportVia = ${arflow:confVar.MainExportService}, rest
OrgModelManager.ExportVia = ${arflow:confVar.MainExportService}, rest
ProcessManager.ExportVia = ${arflow:confVar.MainExportService}, rest
ExecutionManager.ExportVia = ${arflow:confVar.MainExportService}, rest
WorklistManager.ExportVia = ${arflow:confVar.MainExportService}, rest
GlobalProvider.ExportVia = ${arflow:confVar.MainExportService}, rest
ResModelManager.ExportVia = ${arflow:confVar.MainExportService}, rest
RuntimeService.ExportVia = ${arflow:confVar.MainExportService}, rest
# Select an unused port for the servlet service
ServletService.Port = 81
Automatic Client / Remote HTML Runtime Manager¶
The Automatic Client provides a REST API for rendering HTML Context based activities like WebForm and SurveyJS.
Instances.RuntimeManager = RemoteHTMLRuntimeManager
RemoteHTMLRuntimeManager.Implementation = de.aristaflow.adept2.core.runtimemanager.defaultimplementation.DefaultRuntimeManager
RemoteHTMLRuntimeManager.PublishService = true
RemoteHTMLRuntimeManager.ExportVia = ${arflow:confVar.MainExportService}, rest
GUIManager.Implementation = de.aristaflow.adept2.ui.guimanager.RemoteHTMLGUIManager
# Select an unused port for the servlet service
ServletService.Port = 82
HTTPService.Implementation = de.aristaflow.adept2.ui.htmlgui.httpservice.EmbdServContHTTPService
Process Image Renderer¶
# Select an unused port for the servlet service
ServletService.Port = 83
ProcessImageRenderer.ExportVia = ${arflow:confVar.MainExportService}, rest
Additional Servlet Service Configuration Options¶
Next to the port, the servlet service also allows for specifing the network interface to listen on. Like all communication services of the BPM platform, there are two variables: Host
and ExternalHost
Host¶
The address of the network device on which to listen to incoming requests. If this is not set, the default network device of the machine will be used. If this is a subnet mask, e. g. 192.168.10.0/24 the network interface of the corresponding subnet will be used. 0.0.0.0 listens on all network interfaces. In this case an ExternalHost must be configured!
Example
ServletService.Host = 0.0.0.0
External Host¶
The address with which the host can be reached from the outside. This is only required if it listens on all network devices or the address of the configured network device can only be reached via a different address, e. g. when used behind a NAT boundary.
Example
ServletService.ExternalHost = bpm.mydomain.com
Additional Configuration for Developing REST Clients¶
We strongly recommend to use exception logging, validation and message logging while developing a REST client:
rest.LogEntitySize = 10000 rest.Validate = true rest.SuppressServerStack = false
Message logging also requires the declaration and configuration of an appropriate logger (see section 'Logging' in ADEPT2.properties)
Logging.restMessages.Root = de.aristaflow.adept2.base.communication.CommunicationService
Logging.restMessages.Level = FINE
Logging.restMessages.Filter.Root = de.aristaflow.adept2.base.communication.rest.RestServiceExport,\
de.aristaflow.adept2.base.communication.rest.handling.ExceptionLogger,\
de.aristaflow.ilm.ws.rest.base.service.ExceptionHandling
Logging.restMessages.Filter.Classes = org.glassfish.jersey.logging,\
de.aristaflow.adept2.base.communication.rest.handling.ExceptionLogger,\
de.aristaflow.ilm.ws.rest.base.service.ExceptionHandling