Zum Hauptinhalt gehen

Suche

Suche

Rest api - Feedback of status takes 30 seconds

Kommentare

4 Kommentare

  • Avatar
    Xabier Clemente
    Moderator

    Hello Frederik,

    Thank you for reaching us via our Community Forums.

    In order to properly troubleshoot your issue, we would need to hear a little bit more about your environment (how many machines are using BarTender, your printer model, Windows version, etc.) and the method you are using to print labels. Also, is the issue present if you try to print a label through BarTender Designer directly (in case you are using an integration) or do you experience a different behavior? Finally, we would benefit from knowing whether this is a new issue you are experiencing after successfully printing for a time or if this issue has been affecting you from the start; were any changes made to the environment?

    Thank you in advance.

    0
  • Avatar
    Sam Donche

    Hello Xabier

    Below some extra information. Feel free to ask for more information.

    Currently, we are setting up a development environment. Later we would like to roll it out to our production environment with more printers.

    • program version: BarTender 2022 R5 version 11.3/197999 (64-bit)
    • OS: Windows Server 2022 Datacenter x64 build 20348
    • 3 printers: CUSTOM VKP80III (2x), ZDesigner ZT421-203dpi ZPL (1x)

    Printing method:

    • REST API
    • These calls are send from our development platforms: Ignition for our SCADA and OutSystems for our MES
    • Ignition uses java and python libraries to send the http post request.
    • OutSystems uses the in-build functionality to make REST requsts.
    • Example payload for Ignition:
      {"PrintBTWAction": {"DocumentFile": "C:\\path\\to\\bartender\\btw\file",
                                       "Printer": printer_name,
                                       "Copies": copy_no,
                                       "VerifyPrintJobIsComplete": True,
                                       "MaximumRetriesOnFailure": 10,
                                       "JobName": job_name,
                                      "NamedDataSources": {"licence_plate": some_parameter,
                                                                            "PO_item": some_parameter2,
                                                                             ...}}}
    • Example endpoint for Ignition:
      'http://hostname:port/api/actions?KeepStatus=60m&Wait=15s&MessageCount=200&MessageSeverity=Info'
    In Ignition I use the 
    • '/api/actions'-endpoint to submit my print request. The printer does the request fairly quickly after the request.
    • '/api/actions/{Id}'-endpoint to check on the status of the print. I ask this endpoint every x-amount of time for an update on the submitted task. It takes about 30 seconds for it to return a "RanToCompletion" response.
    When using the BarTender Designer, it prints immediately but I'm not sure how to ask for a REST API response on this print job.
    Below the entries in the BarTender History Explorer for both methods. The system in OutSystems suffers from the same delays as Ignition.
    • Print Request from BarTender Designer
      8/29/2023 9:20:02.482 AM
      BarTender successfully sent the print job to the spooler. 
      Job Name: weigh_ticket_w1.btw
      Document: weigh_ticket_w1.btw
      Printer: test_printer

    • Print Request from Ignition (30 seconds delay visible in timestamps)
      8/29/2023 9:25:37.622 AM (BarTender Integration Service)
      Job Status
      Printer: test_printer
      Job ID: 11
      Status: Creating
      Description: Application started creating the print job.

      8/29/2023 9:25:37.573 AM (BarTender Integration Service)
      BarTender successfully sent the print job to the spooler. 
      Job Name: print_w1
      Document: weigh_ticket_w1.btw
      Printer: test_printer

      8/29/2023 9:25:36.553 AM (BarTender)
      Job Status 
      Printer: test_printer
      Job ID: 11
      Status: Creating
      Description: Application started creating the print job.

      8/29/2023 9:25:06.548 AM (BarTender)
      BarTender successfully sent the print job to the spooler. 
      Job Name: print_w1
      Document: weigh_ticket_w1.btw
      Printer: test_printer

      8/29/2023 9:25:04.582 AM (BarTender Integration Service)
      Executing the 'Print Document' action.

      8/29/2023 9:25:04.575 AM (BarTender Integration Service)
      Executing the 'Time Schedule' integration.

      8/29/2023 9:25:03.715 AM (BarTender Integration Service)
      The 'Time Schedule' integration started and is waiting for event.

      8/29/2023 9:25:03.511 AM (BarTender Integration Service)
      Starting the 'Time Schedule' integration 

    We also have other services using another BarTender server. However, for these services the printing status is not important and thus not checked. 
    On the new environment it is important that the status can be checked and works smooth.

    0
  • Avatar
    Sam Donche

    Hi Xabier

    Any updates on this issue?

    0
  • Avatar
    Sam Donche

    Hi Xabier

    Should we give additional information?

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.