/
Best Practices: Database Connection Update Through the REST API

Best Practices: Database Connection Update Through the REST API

Search the IFS Workflow Wiki
 

Back to Best Practices



This will help customers update any database connections in a workflow without having to go one by one each and every time a workflow is moved from one server to the next.

Database Connection Update Through the REST API - Helpful Links



Process

1. The user starts a case.

  • Pre Dynaform, we execute either a call or a query to get the list of processes on the workflow server.

A second call gets all the DB Connections of these workflows.

This information is displayed in a Dynaform, something similar to:

2. The user enters the new connection information.



After the user clicks Submit:

  • All rows of the grid that were selected have their DB updated.

  • This is updated to the settings set in the updated information.

  • The user can go into a test workflow and view their changes.

  • If error(s) are displayed, send the case back to the original user. 



Ran a Test

Put: http://ddevwf2/api/1.0/workflow/project/5713193275b105787286ab4098859148/database-connection/7591174015b1ad8ddc4bed6041179529



Header:

Content-Type:application/json

Authorization:Bearer 96251a83385bec3cdc24a733292bea315b81



Body:

{

     "dbs_type": "oracle",

     "dbs_server": "ddb1.petroleumplace.com",

     "dbs_database_name": "T822",

     "dbs_username": "apps",

     "dbs_password": "situbu602",

     "dbs_port": 1526,

     "dbs_encode": "UTF8",

     "dbs_description": "Changing the description"

}



This changed the database from D721 to T822 and can be highlighted here:

  • Added T822 in the codes table to keep things straight






Copyright© 2024 IFS AB. Copying prohibited. All rights reserved.