Go Back   Printable User Community > Software-Related Talk > FusionPro Server

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 25th, 2008, 10:00 AM
johnstahl johnstahl is offline
Forum n00b
 
Join Date: Sep 2008
Location: Dallas, Texas
Posts: 4
Default using DLQueue event-less interface

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
Reply With Quote
  #2  
Old September 25th, 2008, 11:02 AM
Admin's Avatar
Admin Admin is offline
Administrator
 
Join Date: Oct 2007
Posts: 333
Default Re: using DLQueue event-less interface

John,

What message or error are you getting when you try to submit?
__________________
Forum Administrator
Printable Technologies™, Inc.
Reply With Quote
  #3  
Old October 8th, 2008, 01:37 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 775
Default Re: using DLQueue event-less interface

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)});
Reply With Quote
Reply

Tags
dl queue

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) 2010, Printable Technologies™, Inc.