There are multiple situations when we need to call sections in an Application engine dynamically. To elaborate, we might need to call Section 1 or section 2 based on what is the processing logic.
Below are the steps that need to perform to set it up.
1.  Add the fields AE_APPLID and AE_SECTION to your state record. this is the default state record that you create for the application engine.
2. In PeopleCode step, set the value of AE_APPLID to the application engine program name that you are calling. the setting will generally be based on an If/Else or a conditional statement result.  If it is a section in the same application engine program, you can leave this blank and it will default to the current running application engine program.
3. In a PeopleCode step, set the value of AE_SECTION to the section of the application engine program you are calling. The SE_SECTION and AE_APPLID need to be set to ensure dynamic invocation of Step.
4. Finally set the dynamic flag check box on the call section step 

Advertisements