Scheduling a Process Using a Component Interface in Visual Basic

The following example shows how you might schedule a process from outside of PeopleSoft using Visual Basic.

Initializing the component interface:

Dim oSession As New PeopleSoft_PeopleSoft.Session
Dim oBC As ProcessRequest
oSession.Connect(1, "TCHURY072198:7000", "PTDMO", "PTDMO", 0)
'get component from server
Set oBC = oSession.GetComponent("PROCESSREQUEST")
Status = oBC.Get()

Creating a process request:

  • Properties:

    oBC.REQUESTTYPE = "Create"
    oBC.RUNCONTROLID = "Test"
    oBC.PROCESSTYPE = "SQR Report"
    oBC.PROCESSNAME = "XRFWIN"
    oBC.RUNLOCATION = "PSNT"
    oBC.RUNDATE = "01/01/2000"
    oBC.RUNTIME = "09:00:00"
    oBC.OUTDESTTYPE = "FILE"
    oBC.OUTDESTFORMAT = "SPF"
    oBC.OUTDEST = "C:\temp\"
  • Method:

    ProcessInstance = oBC.Create

Updating a process request:

  • Properties:

    oBC.REQUESTTYPE = "Update"
    oBC.PROCESSINSTANCE = 10
    oBC.RUNSTATUS = "2"
  • Method:

    oBC.Update