libs/ngx-pfe/models/folder-service-activator.model.ts
No results matching.
Properties |
|
| serviceActivatorId |
serviceActivatorId:
|
Type : string
|
|
The id of the service activator that are gonna be used for the config aggregator to transform the folder service activator in a global service activator. That param its mandatory. Example :Will be transformed in... Example : |
| async |
async:
|
Type : boolean
|
| Optional |
|
Execute the service activator call asynchronously. This means, that the loading of a page is not blocked, when the service has not yet returned a result. Should not be set for the following page in the navigation. In this case, a service activator should just be executed synchronously Default: false |
| cleanStaleState |
cleanStaleState:
|
Type : boolean
|
| Optional |
|
set to true to trigger stale state cleaning this is optional because it can be overriden by the pfeConfig "autoCleanState" |
| conditions |
conditions:
|
Type : Conditions
|
| Optional |
|
Defines the conditions to make the ServiceActivator call to the back-end. As it is an Array, you can define more then one condition and all of them must be TRUE to make the ServiceActivator call. (in short: it's an "AND" condition, not an "OR"). Example: conditions: [ { expression: '{$.food} == "schnitzel"' }, { expression: '{$.price} > 1' } ] |
| displayMessage |
displayMessage:
|
Type : string | ExtendedDisplayMessage
|
| Optional |
|
Short message to communicate what the system is doing. You can pass an object with
the keys |
| dontEmitInProgress |
dontEmitInProgress:
|
Type : boolean
|
| Optional |
|
If set to "true", the SA don't emit If a pages have more than 1 OnEnter / OnLeave service activator and only one of them emit the event all emit the event. |
| errorHandling |
errorHandling:
|
Type : ServiceActivatorErrorHandlingConfig<ACTIONS>
|
| Optional |
|
Contains the error handling configuration for this service activator. If no configuration is given, the default behavior of going to the global error page is active. If a configuration is given, it will be activated in case of error responses. |
| globalConfigId |
globalConfigId:
|
Type : string
|
| Optional |
|
Optional id of a service activator in the global config. If a service activator with this id is found in the global config, it is used. If there are additional attributes defined in this configuration, those will partially override the global configuration. |
| globalConfigID |
| true |
globalConfigID:
|
Type : string
|
| Optional |
|
Will throw an error if used. Please use |
| mapUndefinedResponses |
mapUndefinedResponses:
|
Type : boolean
|
| Optional |
|
Boolean to enable undefined responses to be mapped to the state |
| path |
path:
|
Type : string
|
| Optional |
|
The path of the service activator. This is defined by the BFF API. |
| pathParams |
pathParams:
|
Type : PathParams[]
|
| Optional |
|
Path params that appear in the path
With this we are going to be able to build the complete url
|
| queryParams |
queryParams:
|
Type : PfeQueryParam[]
|
| Optional |
|
Query params that appear in the url
With this we are able to send params to the URL
Example: If we want to make a call to https://endpoint.com/contract/1?date=2020-01-01
Where the
|
| responseDataMapping |
responseDataMapping:
|
Type : ServiceActivatorDataMapping[]
|
| Optional |
|
Defines, how the response data should be mapped to the state. |
| serviceActivatorMethod |
serviceActivatorMethod:
|
Type : ServiceActivatorHTTPMethods
|
| Optional |
|
Defines the HTTP call method. Use: POST, GET, PUT or DELETE |
| serviceActivatorResponseStatusHandlers |
serviceActivatorResponseStatusHandlers:
|
Type : ServiceActivatorResponseStatusHandler[]
|
| Optional |
|
Custom response handling per service activator. See ServiceActivatorResponseStatusHandler interface. |
| updateStateValuesBefore |
| Use the `PFE_UPDATE_STATE_VALUES` action before invoking the service activator. |
updateStateValuesBefore:
|
Type : StateUpdates[]
|
| Optional |
|
List of possible userInputState updates To be executed before doing the service activator call |
| errorResponseDataMapping |
| true |
errorResponseDataMapping:
|
Type : ServiceActivatorDataMapping[]
|
| Optional |
|
Defines, how the error response data should be mapped to the state. This will be done, before the navigation to the error page is triggered. Please switch to the errorResponseDataMapping attribute in the new service activator errorHandling configuration |
| preventNavigationOnError |
| true |
preventNavigationOnError:
|
Type : boolean
|
| Optional |
|
When the serviceActivatorErrorHandlingExcludeStatusCodes are used, the navigation is also triggered in case of an error. This flag can be used to activate the previous behavior, where the navigation was not done in case of http error responses. Please switch to the new disableErrorPageNavigation attribute in the service activator errorHandling configuration |
import { NavServiceActivatorConfig } from '../pfe-service-activator/service/service-activator.model';
export interface FolderServiceActivator extends NavServiceActivatorConfig {
/**
* The id of the service activator that are gonna be used for the config aggregator
* to transform the folder service activator in a global service activator.
*
* That param its mandatory.
*
* @example
* ```json
* {
* "serviceActivatorMethod": "FOO",
* "serviceActivatorId": "bar",
* "path": "/foo/bar/"
* }
* ```
* Will be transformed in...
* ```json
* {
* ...,
* "serviceActivators": {
* "bar": {
* "serviceActivatorMethod": "FOO",
* "path": "/foo/bar/"
* }
* }
* }
* ```
*/
serviceActivatorId: string;
}