Page History
Table of Contents |
---|
Cancel all started tasks
Situation
Previous versions of Blueriq provided a fallback mechanism that canceled started tasks that were abandoned, for example due to an unexpected runtime server shutdown. This mechanism still exists in the current version is disabled by default. It can be enabled using theCancel started tasks is the mechanism of recovering the abandoned tasks that were not completed due to unexpected runtime node shutdowns.
Blueriq provides two ways for enabling this mechanism:
- Enabling the property blueriq.processengine.cancel-started-tasks
- on the process module. This is supported also in previous Blueriq versions and it is designed for single nodes environments. For more information about process module properties please consult Process Module Properties.
- Using the cancel started tasks endpoint described below. It is designed for multi-nodes environments and overrules the blueriq.processengine.cancel-started-tasks property.
Warning |
---|
Setting the property blueriq.processengine.cancel-started-tasks to true when running in a multi-node |
environment might cause |
unexpected behavior. For example while the cancellation of started tasks triggered on one runtime node is running, a specific task could be still in progress on another runtime node and it might be reopen. |
Info |
---|
It is recommended to use the endpoint in multi-node environments |
Warning |
This endpoint can be used when unexpected runtime server errors occur in order to recover the tasks that ware not completed due to that error. |
Info |
---|
The endpoint overrules the blueriq.processengine.cancel-started-tasks property. |
In single node environments either the endpoint or the property can be used. |
Description
By calling this endpoint, all started tasks across all nodes will be reset to open. Automatic tasks will executed.
Info | ||
---|---|---|
| ||
|
The endpoint overrules the blueriq.processengine.cancel-started-tasks property.
Update Application Name And Version
Situation
This endpoint is needed in case you already ran a project containing timer jobs and find out that you have to rename the model name and/or version. Renaming the model in studio doesn't change the name on the timer jobs in the database; they still use the old, previous name. The result is that the previously created timer cannot be used anymore. To get it back working normally the application name and/or version have to be changed to the new name (as provided in the studio model) in the database. This can be done by using this endpoint.
Description
By calling one of these endpoint, the application ids for cases matching the application name from the url will be updated with new values. Every job registered to these cases will be updated as well.
Info | ||
---|---|---|
| ||
|
Validations
- Current application id consists of application name and application version. Format of the application id is: applicationName:applicationVersion.
- Current application id is mandatory, case id is optional.
If case id is specified, only one case will be updated. If case id is not specified all cases matching the application id will be updated. - At least new name or new version must be specified in the request body.
Steps:
- Find all cases matching the application id (from the url). If case id is specified, find the case by it's id.
- Update application id for the cases from step 1, with the new data sent in the request body. Name or version or both can be updated, depending on what is specified in the request body.
- Get the jobs for the cases and update them accordingly.
Request examples:
Update application name
The application ids, for the cases with the current application id "export-TestOldProject:0.0-Trunk", are updated to "export-TestNewProject:0.0-Trunk".
Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk
{
"name" : "export-TestNewProject"
}
Update application version
The application ids, for the cases with the current application id "export-TestOldProject:0.0-Trunk", are updated to "export-TestOldProject:0.1-Trunk".Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk
{
"version" : "0.1-Trunk"
}
Update application id (both name and version)
The application ids, for the cases with the current application id "export-TestOldProject:0.0-Trunk", are updated to "export-TestNewProject:0.1-Trunk".Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk
{
"name" : "export-TestNewProject",
"version" : "0.1-Trunk"
}
- Update application id for a specific case
- Update application name
The application id, for the case with the current application id "export-TestOldProject:0.0-Trunk" and case id 1, is updated to "export-TestNewProject:0.0-Trunk".
Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk?caseId=1
{
"name" : "export-TestNewProject"
}
- Update application version
The application id, for the case with the current application id "export-TestOldProject:0.0-Trunk" and case id 1, is updated to "export-TestOldProject:0.1-Trunk".
Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk?caseId=1
{
"version" : "0.1-Trunk"
}
- Update application id
The application id, for the case with the current application id "export-TestOldProject:0.0-Trunk" and case id 1, is updated to "export-TestNewProject:0.1-Trunk".
Info icon false PUT http:
//<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject:0.0-Trunk?caseId=1
{
"name" : "export-TestNewProject",
"version" : "0.1-Trunk"
}
- Update application name
Usage
The following steps should be followed for using this endpoint:
- Make sure that there exists a runtime user with a role that has the permission SCHEDULER_MANAGER.
- Check that blueriq.oauth2.client-id and blueriq.oauth2.secret are defined in application.properties file. If they are missing, please define them.
Access Runtime Swagger Interface:
Info icon false http://<server>:<port>/<runtime>/api/v1/docs/index.html - Fill the username and the password and press Generate Token in order to obtain a new token.
- Expand scheduler.
- Expand the endpoint you want to use. Available options are:
- PUT /scheduler/maintenance/tasks/cancelStarted
- PUT /scheduler/maintenance/applications/{currentApplicationId}
- Specify the request parameters.
- Press Try it out!