antoine_mpo
Reputable Poster
Hi list,
We want to save some pdf to a custom location, renaming them so the name contains usefull information.
(For instance we want to keep invoices, saving them whith the customer and invoice number in the name).
Here is how it should work, basically :
1 - At the end of the ube we want to save, we call a custom bsfn (N56ARCHI) that looks in the job file (F986110) to find
th current ube processing (looking with ube name and version, and processing status), and save the full pdf name in a
custom file (F56ARCHI), with a unique UKID, the server where to save it, and the name for saving.
2 - Then we call a custom ube (R56ARCHIV), in asynchrone mode, passing the previous UKID as a parameter. This ube looks
in the custom table F56ARCHI to get all the information needed, and call a custom C bsfn (B56CPFIC) that copy a file
from one location to another (from the printqueue to the location we choose, renaming the file as needed). This ube is
launched on the same monothread queue (so it processes after the one that calls it is done)
My problem is that the second ube (R56ARCHIV) goes to error, raising an exception (ACCESS_VIOLATION). You can look at
the jde.log attached.
But if i launch this ube manually, putting a ukid in data selection, the ube is working well.
It copies and rename the pdf correctly.
I first thought that the delay between the first job (the one to save) and the second (the one that should copy file) was too short, and that may be JDE kept a handle on the pdf file for a while. So i tried to increase the queue delay (i changed it from 2 sec to 30 sec), but it still the same.
Does anyone have any idea ?
Thanks,
We want to save some pdf to a custom location, renaming them so the name contains usefull information.
(For instance we want to keep invoices, saving them whith the customer and invoice number in the name).
Here is how it should work, basically :
1 - At the end of the ube we want to save, we call a custom bsfn (N56ARCHI) that looks in the job file (F986110) to find
th current ube processing (looking with ube name and version, and processing status), and save the full pdf name in a
custom file (F56ARCHI), with a unique UKID, the server where to save it, and the name for saving.
2 - Then we call a custom ube (R56ARCHIV), in asynchrone mode, passing the previous UKID as a parameter. This ube looks
in the custom table F56ARCHI to get all the information needed, and call a custom C bsfn (B56CPFIC) that copy a file
from one location to another (from the printqueue to the location we choose, renaming the file as needed). This ube is
launched on the same monothread queue (so it processes after the one that calls it is done)
My problem is that the second ube (R56ARCHIV) goes to error, raising an exception (ACCESS_VIOLATION). You can look at
the jde.log attached.
But if i launch this ube manually, putting a ukid in data selection, the ube is working well.
It copies and rename the pdf correctly.
I first thought that the delay between the first job (the one to save) and the second (the one that should copy file) was too short, and that may be JDE kept a handle on the pdf file for a while. So i tried to increase the queue delay (i changed it from 2 sec to 30 sec), but it still the same.
Does anyone have any idea ?
Thanks,