Sending files to "in progress" folder before sending them to "final" folder
Posted: Mon Nov 06, 2023 3:25 pm
Hello,
I am building a script that is taking images, getting data from them, sending the data to server and waiting for webhook to move them to specific folder. The script have one input connection and several output connections(depending on configuration).
Is there a way to first move the images to "working" folder(which is outgoing connection for the script) and at a later time(when the webhook arrives) to move them to another - "final" folder using connections and not hardcoding paths.
Ideal scenario will be as follows:
Script is connected to both the "working" and "final" folder with outgoing connections -> Inside jobArrived() use sendTo('working folder connection name') -> Inside timerFired() or when webhook arrives get the image from "working" folder with createJob('what is the path to working?')
The problem with this approach is that createJob() requires folder path and from what I saw there is no way to retrieve the folder path by the connection(maybe there is?). Possible solution will be to set the "working" folder path as flowElement property but my idea is that the script can be used on different machines and operate only with connections and connection names and not hard coding folder paths.
I am open to any solutions not only the suggestion provided above.
I am building a script that is taking images, getting data from them, sending the data to server and waiting for webhook to move them to specific folder. The script have one input connection and several output connections(depending on configuration).
Is there a way to first move the images to "working" folder(which is outgoing connection for the script) and at a later time(when the webhook arrives) to move them to another - "final" folder using connections and not hardcoding paths.
Ideal scenario will be as follows:
Script is connected to both the "working" and "final" folder with outgoing connections -> Inside jobArrived() use sendTo('working folder connection name') -> Inside timerFired() or when webhook arrives get the image from "working" folder with createJob('what is the path to working?')
The problem with this approach is that createJob() requires folder path and from what I saw there is no way to retrieve the folder path by the connection(maybe there is?). Possible solution will be to set the "working" folder path as flowElement property but my idea is that the script can be used on different machines and operate only with connections and connection names and not hard coding folder paths.
I am open to any solutions not only the suggestion provided above.