|
#1
|
|||
|
|||
|
I am trying to develop a simple interface for DLQueue. I have been able to connect to the Queue, but I am not able to submit a job.
Does any one have an example of what the submit should look like. Even better an example of a working application. Any lanuage is acceptable. The lack of examples in the doumentation can be very difficult. Thank you John |
|
#2
|
||||
|
||||
|
John,
What message or error are you getting when you try to submit? |
|
#3
|
||||
|
||||
|
Below is a VB/VBScript example of a basic connection and job submission using the DL Queue Client API (DLQueueClient.ocx). It demonstrates how to poll and wait for a job to be completed.
Code:
Option Explicit
Function RunJob(CommandLine, SchedulerName, UserName, Password)
Dim DLQClient1 As DLQueueClient
Dim Status As DLQ_CONNECTION_STATUS
Dim Job As DLQueueJob
Dim Token As Long, MYERROR As Long
RunJob = False
Set DLQClient1 = CreateObject("DLQueueClient")
Status = DLQClient1.ConnectRemote(SchedulerName, UserName, Password, 10)
If Status <> DLQ_ConnStatus_Connected Then
document.write _ DLQClient1.ConnStatusString(DLQClient1.ConnectionStatus), _
Title:="Connection failed"
DLQClient1.Disconnect
Set DLQClient1 = Nothing
Exit Function
End If
document.write "Connected: ID=" & DLQClient1.Connection.ID & _
' ", LoginName=" & DLQClient1.Connection.LoginName & _
' ", MachineName=" & DLQClient1.Connection.MachineName
Set Job = CreateObject("DLQueueJob")
Job.CommandLine = CommandLine
Job.Name = "Q1"
MYERROR = DLQClient1.SubmitJob(Job, 10, False)
Token = Job.Token
Do
Set Job = DLQClient1.GetJobByToken(Token)
If Job Is Nothing Then Exit Do
If DLQClient1.IsJobStatusFinal(Job.Status) Then Exit Do
DLQClient1.Sleep 100
'DoEvents
Loop
If Job Is Nothing Then
Document.write "Job not found after submission!"
Exit Function
End If
Document.write "Job completed with return code " & _
Job.ReturnCode
Set Job = Nothing
DLQClient1.Disconnect
Set DLQClient1 = Nothing
RunJob = True
End Function
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable Technologies Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant warning messages. Please contact Support for all font- and installation-related issues. You may also want to check your fonts.err file. The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MCC. "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
|
![]() |
| Tags |
| dl queue |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|