Private targetSub As String = "JobDone"
'Initializes the Job.
'Name - The job's name. Note that the name doesn't need to be unique.
'TargetModule - The activity or service that will handle the JobDone event.
'TargetFunction - The function to be called to handle the JobDone event.
Public Sub Initialize2 (Name As String, TargetModule As Object, TargetFunction As String)
JobName = Name
target = TargetModule
targetSub = TargetFunction
End Sub
'Called by the service when job completes
Public Sub Complete (id As Int)
taskId = id
CallSubDelayed2(target, targetSub, Me)
End Sub