Skip to content
How to Run a Step Group from Code

How to Run a Step Group from Code

The Breezz framework allows you to execute an entire Step Group programmatically from Apex Code. This is done using the forvendi.BreezzApi.STEPS.runGroup method.

Let’s test this functionality by executing the code below. You can run this directly in the Developer Console via Anonymous Apex:

// 1. Prepare the execution context by mocking a record
Account[] accounts = new Account[]{ new Account(Name='Test Account') };

// 2. Run the previously created 'ToUpperCaseFieldSteps' Step Group
forvendi.BreezzApi.STEPS.runGroup('ToUpperCaseFieldSteps', accounts);

// 3. Display the results in the debug log
System.debug(accounts);

Result: Check your debug logs. You should see that the Account’s Name field has been automatically transformed from Test Account to TEST_ACCOUNT, proving that the Custom Step successfully processed the in-memory record.