Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
With the BRIDGE you can define dedicated activities that should be executed on service startup and service shutdown. You can use this to implement task that should be executed only once, e.g. reading or writing a data cache.
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
The startup and shutdown activities can be added to the service composite in section StartupShutdown:
Info | ||
---|---|---|
| ||
Startup and shutdown activities are executed automatically:
|
Implementing a Startup / Shutdown Activity
The example shows a simple caching service. On service startup, the startup activity reads the data from the cache file and stores it into memory. While the service is up and running, new data may be added to the data in memory. On service shutdown, the data is written to the cache file to be available on next service start.
Startup and shutdown activities cannot have any parameters. Apart from this, you can do what you want: read files, call other services, call adapters or libraries, trigger the BRIDGE API, and more.
Testing a Startup / Shutdown Activity
If startup and shutdown activities are present in an xUML service composite, the compiler will automatically generate a shadow port to be able to access them. The generated port number is service port + 40000, but you can configure this on the composite in section StartupShutdown:
Via this port, you can trigger the startup or shutdown activity from the SOAP Test Tool or the ANALYZER.
Panel | ||
---|---|---|
| ||
|