Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

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.

Info
iconfalse

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.

Info

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: 

    Info
    iconfalse
    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 this endpoint, the application name, application version or both application name and version can be updated for the cases matching a criteria.

Info
iconfalse

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

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

The main functionality of this endpoint is to take all cases for which the application id starts with the one specified in the url {oldApplicationName}, and update them with the new name or version or both.
If only new application name is specified in request body, then the application id will be updated with the new application name only.
If only new application version is specified in request body, the application id is updated with the new version only.
If both are specified, the entire application id will be updated.
Request examples:

  1. Update application name.
    All cases where application name is "export-TestOldProject", is updated to "export-TestNewProject".

    Info
    iconfalse

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

    {
    "name" : "export-TestNewProject"
    }


  2. Update application version.
    All cases where application name is "export-TestOldProject", version is updated to "0.1-Trunk".

    Info
    iconfalse

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

    {
    "version" : "0.1-Trunk"
    }


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

    Info
    iconfalse

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

    {
    "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: 

    Info
    iconfalse
    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/applications/{oldApplicationName}.
  7. Specify the old application name you would like to update.
  8. Specify the body of the request with the new application name, or new application version or both.
  9. Press Try it out!

Update Process Engine Id for Jobs

Description

By calling this endpoint, the jobs for a specific case will be updated with the new process engine id.

Info
iconfalse

PUT http://<server>:<port>/<runtime_name>/api/v1/scheduler/maintenance/jobs/{taskId} 

This functionality does the following:

  1. Finds the task with the specified task id. 
  2. Takes the case from the task. 
  3. Calls the scheduler to find all jobs for that specific case id.
  4. Updates all the jobs with the new process engine id, constructed from the case model (found in step 2).

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: 

    Info
    iconfalse
    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/jobs/{taskId}.
  7. Specify the task id.
  8. Press Try it out!