Process Builder allows you to call an Apex class that includes methods annotated with @InvocableMethod. You can also pass the required value in Apex class variables.
To do this, select the Apex action in the process. In Chapter 6, Building Efficient and Performance Optimized Processes, we will discuss a use case where the system can auto-delete open cases when an account is out of business using an Apex class and by calling it from Process Builder.