You can update some variables in the external node by including additional variables. Attached is a sample script that will update the print quantity based on a pdf keyword. You need to write the variables you need to update to $FFout$\FFSetVariables.txt.
Using this example:
f = open(sys.argv+"/FFSetVariables.txt","a+") # Create and write the text file FFSetVariables.txt in $FFout$ (sys.argv)
f.write ("$FFwfJob.printQuantity$="+sys.argv) # Write the variable $FFwfJob.printQuantity$=<<The value in variable sys.argv which is the pdf keyword>> to the text file
f.close() # Close the text file
Then setup the external process like this:
The attached pdf contains the keyword 150, which will be set as the print quantity.
You could also create a new/updated pdf somehow by a script. The new/updated pdf then has to be copied/moved to $FFout$ to pass it to the next stage in the workflow.
Many thanks for your help, the scripts we are now using based on your starters keep a lot of errors away from the production.
So now we want to go the next step.
We want to make decisions based on the result of the external node.
Is it possible to access another node directly out of the script?
Or can we write with the external node a value back into an existing variable?
Or can we write with the external node a value back into the PDF file?
With one of these possibilities we would have opened the sky.
In addition for a good comparision I need to use a further variable in the external script. This variable is a string. But all tries to compare a string value failed so far.
Is this a reglementation within the external script function in combination with python?
Or do you have any kind of example with handling of a string variable?
Glad to hear you got it working.
I see the issue with the email notification giving two job numbers. Please contact your local Xerox support to have the issue resolved.
it was completely my mistake. I did not installed Python on the server. Our other external programs are working with batch script language. After installing it, everything works fine. Many thanks for your help. So the subject is solved.
The error message send from the system is like this:
[FreeFlowCore] Beim FreeFlow Core-Auftrag 28365 ist der folgende Fehler aufgetreten: Auftrag 5 hat Status "Abgebrochen"
Why is the number of the job 5? Do we have two different internal Job numbers?
Here is how I set it up.
In the MAX Setup column A is the file name and column B is the custom field jobpages.
External Process setup:
You need to point to the batch file in the External Process. In the batch file you may also need to change the path to Python and to the FreeFlow Core scripts folder where both the batch file and the Python script should be placed.
If jobpages equals the number of pages in the pdf, then the job completes and if not, it fails.
I don't think you can upload attachments but you could use something like wetransfer.com och paste the link.
I am using FreeFlow Core version 6.1.4.
this looks good to work. But FreeFlow has a problem with reading the variable "$FFAnzahlSeitenPDF$"
[FreeFlowCore] Beim FreeFlow Core-Auftrag 28279 ist der folgende Fehler aufgetreten: Bei der Auswertung des Ausdrucks "AnzahlSeitenPDF" ist ein Fehler aufgetreten.-
This is the entry of the external node:
"$FFin$" "$FFout$" "$FFwfDoc.pages$" "$FFAnzahlSeitenPDF$"
By the way, is there a possibility for me sending up screenshots or ZIP files?
Althoug that may work I then Loose all the benifits of using Max IE sending information to the printer with Stock, Copy Count, Ect. For MAX it all has to work in 1 pass no external processes. Otherwise i would just rename the file and dropp it in a hot folder to send it to the printer.
Here is an idea.
Assume your manifest looks like this:
where the first column is the pdf and the second is the number of pages ordered. Assuming the second column is given the custom field name jobpages you can in an External Process use the parameters:
"$FFin$" "$FFout$" "$FFwfDoc.pages$" "$FFjobpages$"
and use the attached batch file that runs the attached Python script:
pages1 = sys.argv
pages2 = sys.argv
if pages1 == pages2:
If the number of pages in the file equal the number of pages ordered then the job keeps going in the workflow or else the script exits and the job fails.