Hi Sagar,
Good Day! You can use what we call a Java Action in your flow logic, Please refer to the documentation below https://docs.mendix.com/refguide/java-actions/