Hp indigo dfe - getting feedback

ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

Hi,

Has anyone prepared a solution for getting feedback from the production pro server (dfe) regarding whether a job was successfully printed or not?

Thanks

Ariel
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

ArielRauch wrote: Hi,

Has anyone prepared a solution for getting feedback from the production pro server (dfe) regarding whether a job was successfully printed or not?

Thanks

Ariel
You can use JMF for that. HP has a pretty robust spec. I wrote a basic library in PHP that you can use to query your DFE to see the status of a job, queue, or print device. Check it out: http://jdf.dominick.p.elu.so/



Something pretty easily with a script configurator could be done, utilizing cURL to allow Switch to make such a call and receive the response JMF as metadata. If you are interested in pursuing this, I'd be happy to help. That sounds like a lot of fun!
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

Hi Gabriel,

Yes, I am definitely interested!

I have looked at the link. The site offers code examples to send files to the DFE. As I understood you a routine which checks the status of the different queues at the dfe, which is exactly the first step to what I thought to implement.

It would be great if you could share it.



Thank you



Ariel
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

Here is a basic example I just whipped up which allows two JMF calls (status and fullStatus): https://github.com/dominickp/SwitchJMF



It basically just creates a simple JMF message, then puts that into a bash script which is built to use cURL. cURL POSTs the data to your print device and the response JMF is added as external metadata. The data output is the file with metadata. The log output is the bash script -- just throw that away.



Here is the result:

Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

looks very cool - I will try it.

I assume you have access to bash as your switch is installed on a mac. Mine is installed on Windows:(



It might be a good idea to use either perl or php. I will look into it and talk to you.



Thank you very much



Ariel
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Hp indigo dfe - getting feedback

Post by dkelly »

For windows try cygwin toolset
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

ArielRauch wrote: I assume you have access to bash as your switch is installed on a mac. Mine is installed on Windows:(
I have Switch running on a mac but I do my development on Windows. It is a huge pain in the butt... If you successfully execute a PHP in command line on Windows, I'd really love to hear the steps needed to do that. That would be much easier than dealing with bash.



dkelly wrote: For windows try cygwin toolset
I did give this a shot but Switch doesn't hook into cygwin since you have to launch the cygwin terminal to use any commands like cURL. If there was some way to tell Switch to execute in cygwin, that would help, but otherwise I don't think it can be done.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Hp indigo dfe - getting feedback

Post by dkelly »

You should be able to call the php program directly from Switch, or call bash directly - bash -c "cmds"
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

Dwight, Gabriel thank you.

I still had no time to look into it physically (Friday - no work here in Israel) but I would like to offer a general concept:

1. A general flow should fetch all the printed jobs in short intervals .

2. The jobs should be identified by its name (Best I could think of)

3. All the jobs are entered into global data

4 a job is progressed to its next station after dfe only if it is found printed .

5. The global data for this specific job is then removed



Tell me what you think about it



Ariel
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

Hi Gabriel,

I downloaded curl for windows and adapted the shell script.

When running the batch file I receive a syntax error. (unexpected <...).

Could you please give some hints how to debug.



Thanks



Ariel
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

ArielRauch wrote: Hi Gabriel,

I downloaded curl for windows and adapted the shell script.

When running the batch file I receive a syntax error. (unexpected
Hmm... are you sure the batch file is giving you the error and not Switch Scripter? Could you copy the fields that are logged when Debug Level is set to 1?



Did you install cURL with cygwin? Remember, I don't think Switch can properly execute via cygwin.



Also, the way the script works, it builds a temp .sh file and which has the cURL command. If you didn't find a way to have Switch launch the file in cygwin, then .sh files would not work either. Also, the temp .sh file needs it's permissions change so again, there would have to be the windows version of chmod +777 in there too.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

I downloaded curl.exe command line utility for windows.

I let your script create a batch command file with the content of your script and I run it from the command line to avoid problems on the way.

It could be that there are differences in the syntax but I checked and the -d option exists also in my version
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

ArielRauch wrote: I downloaded curl.exe command line utility for windows.

I let your script create a batch command file with the content of your script and I run it from the command line to avoid problems on the way.

It could be that there are differences in the syntax but I checked and the -d option exists also in my version
Well, you can try just opening curl in the command line and pasting in my script, replacing the variables where needed. That should help you debug any issues with the curl script itself.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

Hp indigo dfe - getting feedback

Post by ArielRauch »

I will try later but I do not know the syntax - can you perhaps send me a shorter request only for testing purposes.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Hp indigo dfe - getting feedback

Post by gabrielp »

ArielRauch wrote: I will try later but I do not know the syntax - can you perhaps send me a shorter request only for testing purposes.


curl -X POST -d '<?xml version="1.0" encoding="UTF-8"?><JMF xmlns="http://www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SenderID="MIS System" TimeStamp="2006-04-19T17:47:10-07:00" Version="1.2"><Query ID="misb4c3c9f88d02c8ea" Type="Status" xsi:type="QueryStatus"><StatusQuParams DeviceDetails="Details" /></Query></JMF>' --header "Content-Type: application/vnd.cip4-jmf+xml" 192.168.1.45/dfe/url/goes/here
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Post Reply