Best Practices: Database Connection Update Through the REST API
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
http://wiki.processmaker.com/3.2/REST_API_Designer/Database_Connections#Get_Database_Conections_List
http://wiki.processmaker.com/3.2/REST_API_Designer/Database_Connections#Update_database_connection
http://wiki.processmaker.com/3.2/REST_API_Designer/Processes#get_projects
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
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.