You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Cancel all started tasks

Description

By calling this endpoint, all the started tasks across all nodes will be reopen. Automatic tasks will also be executed.

PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/tasks/cancelStarted

Setting the property blueriq.processengine.cancel-started-tasks to true when running in a multi-node environment might cause problems because while the cancellation of started tasks triggered on one node is running, a specific task could be still in progress on another node and it might be reopen.

Cancel all started tasks endpoint was created in order to avoid these types of situations.

The endpoint overrules the blueriq.processengine.cancel-started-tasks property.

Usage

The following steps should be followed for using this endpoint:

  1. Make sure that there exists a runtime user with a role that has the permission SCHEDULER_MANAGER.
  2. Check that blueriq.oauth2.client-id and blueriq.oauth2.secret are defined in application.properties file. If they are missing, please define them.
  3. Access Runtime Swagger Interface: 

    http://<server>:<port>/<runtime>/api/v1/docs/index.html
  4. Fill the username and the password and press Generate Token in order to obtain a new token.
  5. Expand scheduler.
  6. Expand PUT /scheduler/maintenance/tasks/cancelStarted.
  7. Press Try it out!

 

Update Application Name And Version

Description

By calling one of these endpoints, the application id will be updated for the cases and jobs matching the specified criteria.

PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/{oldApplicationName}/{oldApplicationVersion}

{
"name" : {newApplicationName},
"version" : {newApplicationVersion}
}

 

Steps:

  1. Find all cases where application id contains the old application name. If old application version is specified in the url, find all cases where application id matches with the name and version.
  2. Update application id for these cases with the new data sent in the request body.

Request examples:

  1. Update application name.

    1.1 Update application name on every version of your old application.
    All cases where application name is "export-TestOldProject" are updated to "export-TestNewProject". 

    PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject

    {
    "name" : "export-TestNewProject"
    }

    Note

    If you do not specify the old application version in the url, this endpoint will update the application name for every version of the specified old application. If you would like to update the application name only for a specific version, you should use the endpoints below.

    1.2. Update application name for a specific version.
    All cases where application name is "export-TestOldProject" and version is "0.0-Trunk" are updated to "export-TestNewProject". Version remains the same. 

    PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject/0.0-Trunk

    {
    "name" : "export-TestNewProject"
    }

  2. Update application version.
    All cases where application name is "export-TestOldProject" and version is "0.0-Trunk", version is updated to "0.1-Trunk". Application name remains the same.

    PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject/0.0-Trunk

    {
    "version" : "0.1-Trunk"
    }


  3. Update application id (both name and version)
    All cases where application name is "export-TestOldProject" and version is "0.0-Trunk", application name is updated to "export-TestNewProject" and version is updated to "0.1-Trunk".

    PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/export-TestOldProject/0.0-Trunk

    {
    "name" : "export-TestNewProject",
    "version" : "0.1-Trunk"
    }


Usage

The following steps should be followed for using this endpoint:

  1. Make sure that there exists a runtime user with a role that has the permission SCHEDULER_MANAGER.
  2. Check that blueriq.oauth2.client-id and blueriq.oauth2.secret are defined in application.properties file. If they are missing, please define them.
  3. Access Runtime Swagger Interface: 

    http://<server>:<port>/<runtime>/api/v1/docs/index.html
  4. Fill the username and the password and press Generate Token in order to obtain a new token.
  5. Expand scheduler.
  6. Expand PUT /scheduler/maintenance/applications/{oldApplicationName} or PUT /scheduler/maintenance/applications/{oldApplicationName}/{oldApplicationVersion}.
  7. Specify the old application name you would like to update. Optionally specify the application version.
  8. Specify the body of the request with the new application name, or new application version or both.
  9. Press Try it out!

Update Application Name and Version for a Case

Description

By calling this endpoint, only one case and it's jobs will be updated with the new information.

PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/applications/cases/{caseId} 

{
"name" : {newApplicationName},
"version" : {newApplicationVersion}
}

Steps:

  1. Finds the case with the specified case id. 
  2. Update the application id for the case found.  Application id is updated with the new application name sent in the request body. Optionally, if specified in the body, application version will be updated as well.
  3. Calls the scheduler to find all jobs for the case from step 1.
  4. Updates all the jobs with the new application id.

Usage

The following steps should be followed for using this endpoint:

  1. Make sure that there exists a runtime user with a role that has the permission SCHEDULER_MANAGER.
  2. Check that blueriq.oauth2.client-id and blueriq.oauth2.secret are defined in application.properties file. If they are missing, please define them.
  3. Access Runtime Swagger Interface: 

    http://<server>:<port>/<runtime>/api/v1/docs/index.html
  4. Fill the username and the password and press Generate Token in order to obtain a new token.
  5. Expand scheduler.
  6. Expand PUT /scheduler/maintenance/applications/cases/{caseId}.
  7. Specify the case id.
  8. Press Try it out!


  • No labels