Skip to content

Commit b78e840

Browse files
committed
Add compile-safe bypass methods for Flow and Trigger Action types in documentation
1 parent 48f1679 commit b78e840

File tree

4 files changed

+260
-0
lines changed

4 files changed

+260
-0
lines changed

docs/trigger-actions-framework/MetadataTriggerHandler.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,65 @@ True if the Trigger Action is bypassed, false otherwise.
169169

170170
---
171171

172+
### `bypass(actionType)`
173+
174+
Bypass the execution of a Trigger Action.
175+
176+
#### Signature
177+
```apex
178+
public static void bypass(System.Type actionType)
179+
```
180+
181+
#### Parameters
182+
| Name | Type | Description |
183+
|------|------|-------------|
184+
| actionType | System.Type | The Type of the Trigger Action to bypass. |
185+
186+
#### Return Type
187+
**void**
188+
189+
---
190+
191+
### `clearBypass(actionType)`
192+
193+
Clear the bypass for a Trigger Action.
194+
195+
#### Signature
196+
```apex
197+
public static void clearBypass(System.Type actionType)
198+
```
199+
200+
#### Parameters
201+
| Name | Type | Description |
202+
|------|------|-------------|
203+
| actionType | System.Type | The Type of the Trigger Action to clear the bypass for. |
204+
205+
#### Return Type
206+
**void**
207+
208+
---
209+
210+
### `isBypassed(actionType)`
211+
212+
Check if a Trigger Action is bypassed.
213+
214+
#### Signature
215+
```apex
216+
public static Boolean isBypassed(System.Type actionType)
217+
```
218+
219+
#### Parameters
220+
| Name | Type | Description |
221+
|------|------|-------------|
222+
| actionType | System.Type | The Type of the Trigger Action to check. |
223+
224+
#### Return Type
225+
**Boolean**
226+
227+
True if the Trigger Action is bypassed, false otherwise.
228+
229+
---
230+
172231
### `clearAllBypasses()`
173232

174233
Clear all bypasses for Trigger Actions.

docs/trigger-actions-framework/TriggerActionFlow.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,74 @@ public static Boolean isBypassed(String flowName)
101101

102102
---
103103

104+
### `bypass(flowType)`
105+
106+
This method bypasses the execution of the Flow for the specified list of records.
107+
108+
#### Signature
109+
```apex
110+
public static void bypass(System.Type flowType)
111+
```
112+
113+
#### Parameters
114+
| Name | Type | Description |
115+
|------|------|-------------|
116+
| flowType | System.Type | The Type of the Flow to bypass (e.g., Flow.Interview.MyFlow.class). |
117+
118+
#### Return Type
119+
**void**
120+
121+
#### Throws
122+
IllegalArgumentException: if the type does not represent a Flow.
123+
124+
---
125+
126+
### `clearBypass(flowType)`
127+
128+
This method clears the bypass for the specified list of records.
129+
130+
#### Signature
131+
```apex
132+
public static void clearBypass(System.Type flowType)
133+
```
134+
135+
#### Parameters
136+
| Name | Type | Description |
137+
|------|------|-------------|
138+
| flowType | System.Type | The Type of the Flow to clear the bypass for (e.g., Flow.Interview.MyFlow.class). |
139+
140+
#### Return Type
141+
**void**
142+
143+
#### Throws
144+
IllegalArgumentException: if the type does not represent a Flow.
145+
146+
---
147+
148+
### `isBypassed(flowType)`
149+
150+
This method checks if the Flow is bypassed for the specified list of records.
151+
152+
#### Signature
153+
```apex
154+
public static Boolean isBypassed(System.Type flowType)
155+
```
156+
157+
#### Parameters
158+
| Name | Type | Description |
159+
|------|------|-------------|
160+
| flowType | System.Type | The Type of the Flow to check the bypass for (e.g., Flow.Interview.MyFlow.class). |
161+
162+
#### Return Type
163+
**Boolean**
164+
165+
,[object Object], if the Flow is bypassed for the specified list of records, ,[object Object], otherwise.
166+
167+
#### Throws
168+
IllegalArgumentException: if the type does not represent a Flow.
169+
170+
---
171+
104172
### `clearAllBypasses()`
105173

106174
This method clears all bypasses for all Flows.

docs/trigger-actions-framework/TriggerActionFlowChangeEvent.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,80 @@ public static Boolean isBypassed(String flowName)
111111

112112
---
113113

114+
### `bypass(flowType)`
115+
116+
*Inherited*
117+
118+
This method bypasses the execution of the Flow for the specified list of records.
119+
120+
#### Signature
121+
```apex
122+
public static void bypass(System.Type flowType)
123+
```
124+
125+
#### Parameters
126+
| Name | Type | Description |
127+
|------|------|-------------|
128+
| flowType | System.Type | The Type of the Flow to bypass (e.g., Flow.Interview.MyFlow.class). |
129+
130+
#### Return Type
131+
**void**
132+
133+
#### Throws
134+
IllegalArgumentException: if the type does not represent a Flow.
135+
136+
---
137+
138+
### `clearBypass(flowType)`
139+
140+
*Inherited*
141+
142+
This method clears the bypass for the specified list of records.
143+
144+
#### Signature
145+
```apex
146+
public static void clearBypass(System.Type flowType)
147+
```
148+
149+
#### Parameters
150+
| Name | Type | Description |
151+
|------|------|-------------|
152+
| flowType | System.Type | The Type of the Flow to clear the bypass for (e.g., Flow.Interview.MyFlow.class). |
153+
154+
#### Return Type
155+
**void**
156+
157+
#### Throws
158+
IllegalArgumentException: if the type does not represent a Flow.
159+
160+
---
161+
162+
### `isBypassed(flowType)`
163+
164+
*Inherited*
165+
166+
This method checks if the Flow is bypassed for the specified list of records.
167+
168+
#### Signature
169+
```apex
170+
public static Boolean isBypassed(System.Type flowType)
171+
```
172+
173+
#### Parameters
174+
| Name | Type | Description |
175+
|------|------|-------------|
176+
| flowType | System.Type | The Type of the Flow to check the bypass for (e.g., Flow.Interview.MyFlow.class). |
177+
178+
#### Return Type
179+
**Boolean**
180+
181+
,[object Object], if the Flow is bypassed for the specified list of records, ,[object Object], otherwise.
182+
183+
#### Throws
184+
IllegalArgumentException: if the type does not represent a Flow.
185+
186+
---
187+
114188
### `clearAllBypasses()`
115189

116190
*Inherited*

docs/trigger-actions-framework/TriggerBase.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,65 @@ True if the object is bypassed, false otherwise.
110110

111111
---
112112

113+
### `bypass(sObjectType)`
114+
115+
This method bypasses the execution of the specified object.
116+
117+
#### Signature
118+
```apex
119+
public static void bypass(Schema.sObjectType sObjectType)
120+
```
121+
122+
#### Parameters
123+
| Name | Type | Description |
124+
|------|------|-------------|
125+
| sObjectType | Schema.sObjectType | The sObjectType of the object to bypass. |
126+
127+
#### Return Type
128+
**void**
129+
130+
---
131+
132+
### `clearBypass(sObjectType)`
133+
134+
This method clears the bypass for the specified object.
135+
136+
#### Signature
137+
```apex
138+
public static void clearBypass(Schema.sObjectType sObjectType)
139+
```
140+
141+
#### Parameters
142+
| Name | Type | Description |
143+
|------|------|-------------|
144+
| sObjectType | Schema.sObjectType | The sObjectType of the object to clear the bypass for. |
145+
146+
#### Return Type
147+
**void**
148+
149+
---
150+
151+
### `isBypassed(sObjectType)`
152+
153+
This method checks if the specified object is bypassed.
154+
155+
#### Signature
156+
```apex
157+
public static Boolean isBypassed(Schema.sObjectType sObjectType)
158+
```
159+
160+
#### Parameters
161+
| Name | Type | Description |
162+
|------|------|-------------|
163+
| sObjectType | Schema.sObjectType | The sObjectType of the object to check the bypass for. |
164+
165+
#### Return Type
166+
**Boolean**
167+
168+
True if the object is bypassed, false otherwise.
169+
170+
---
171+
113172
### `clearAllBypasses()`
114173

115174
This method clears all bypasses.

0 commit comments

Comments
 (0)