Using the TriggerBusinessEvent Function

You use this function in every Workflow PeopleCode program.

In components that use Virtual Approver, you do not use these functions explicitly in the Workflow PeopleCode. Instead, you use the Virtual_Router PeopleCode library function, which uses these two functions internally.

TriggerBusinessEvent triggers a specified business event and the workflow routings that are associated with that event. The syntax is:

TriggerBusinessEvent(BUSPROCESS.BusProcName, BUSACTIVITY.ActivityName, BUSEVENT.⇒
BusEventName)

The BusProcName, ActivityName, and BusEventName parameters are the names of the business process, activity, and event from PeopleSoft Application Designer. They are all strings, enclosed in quotes. For example, the following code triggers the Deny Purchase Request event in the Manager Approval activity of the Purchase Requisition business process:

TriggerBusinessEvent(BUSPROCESS."Purchase Requisition", BUSACTIVITY."Manager⇒
 Approval", BUSEVENT."Deny Purchase Request")

See PeopleCode Language Reference: TriggerBusinessEvent function.