Stored Procedure Call

 

Let’s see how we can call the Stored Procedure from MuleSoft.

Create a project and add HTTP listener to call the API

Stored Procedure Call

 

Drag and Drop stored procedure connector

Stored Procedure Call

 

Create a DB connection

Stored Procedure Call

 

Add the SQL text for calling the procedure and the input parameter

Now add a transformation

 

Here metadata for the output will be pre-populated and we can map the data accordingly

Run the application using – http://localhost:8081/insert

 

And now we can see the data added in Target table –

Stored Procedure Call

 

Procedure we are calling here –


create or replace PROCEDURE add_job_history
( p_emp_id job_history.employee_id%type
, p_start_date job_history.start_date%type
, p_end_date job_history.end_date%type
, p_job_id job_history.job_id%type
, p_department_id job_history.department_id%type
)
IS
BEGIN
INSERT INTO job_history (employee_id, start_date, end_date,
job_id, department_id)
VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);
END add_job_history;

Sample application – http://mulesy.com/wp-content/uploads/2019/01/oracle-db-stored-procedure.zip

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mule Soft Training In Hyderabad

Thanks for such a valuable informative post on mule soft. By going through it most of my ongoing doubts regarding mule soft have been cleared. Looking forward for more of such informative posts.
For more details on Mule soft Training In Hyderabad, please vist

https://www.kellytechno.com/Hyderabad/Course/MuleSoft-Training-In-Hyderabad

jira certification
5 years ago

nice post thanks for sharing

santu
4 years ago

hi , could u please show one example with parameter type OUT,