Hi,
I am not sure whether this is possible but I thought to built some so-called service flows which take files from different flows (via user-managed folder) do some work on them and then hand them back to the calling flow.
Unfortunately, I do not know how to tell the flows to take only files they have injected into the sub-flow.
Is this possible?
Thank you,
Ariel
call a (sub) flow and read back result
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
I think I found out how to do it:
1. Before submitting to the sub-flow I am adding private data tag (flowID) with the name of the flow to the job.
2. When fetching the result I am checking (via the connection) whether the private data tag equals "my" flow.
The problem is that currently something is avoiding the file to go through the "jobs arrived" script I wrote to set the private data tag.
No erro message - strange.
1. Before submitting to the sub-flow I am adding private data tag (flowID) with the name of the flow to the job.
2. When fetching the result I am checking (via the connection) whether the private data tag equals "my" flow.
The problem is that currently something is avoiding the file to go through the "jobs arrived" script I wrote to set the private data tag.
No erro message - strange.
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
stupid me!!!
job.sendToSingle(job.getPath()) made the trick.
BTW, flowID must receive a unique identifier (flow name is not sufficient)
job.sendToSingle(job.getPath()) made the trick.
BTW, flowID must receive a unique identifier (flow name is not sufficient)
call a (sub) flow and read back result
I wish there was a better/easier way to use flows as functions so you could call out to them within Switch. I know you can assemble and compress them, then uncompress them and pass them into shared hotfolders but it could be much more elegant.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
found a much easier way:
sub routine:
you need a not-managed folder in and a not-managed folder out (do not strip prefix)
calling flow: before sending to in folder (above) add a private data tag (I called it flowID) and populate it with: s.flowname+"_"+job.getUniquePrefix
in the same flow create a receiving folder for the output of the subflow pointing at the OUT folder.
connect it directly to a package (allowFlowID) which only allows passing (sendtosinglepath) if and only if the flowid equals the s.getFlowName+"_+job.getUniquePrefix
That makes the trick I think
Someone is working on the server - I will send you the flows when I get access to.
sub routine:
you need a not-managed folder in and a not-managed folder out (do not strip prefix)
calling flow: before sending to in folder (above) add a private data tag (I called it flowID) and populate it with: s.flowname+"_"+job.getUniquePrefix
in the same flow create a receiving folder for the output of the subflow pointing at the OUT folder.
connect it directly to a package (allowFlowID) which only allows passing (sendtosinglepath) if and only if the flowid equals the s.getFlowName+"_+job.getUniquePrefix
That makes the trick I think
Someone is working on the server - I will send you the flows when I get access to.
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
how can I put the flows here?
call a (sub) flow and read back result
ArielRauch wrote: how can I put the flows here?
You can export them and put them on GitHub. That's what I've been doing.
Otherwise you can probably host them at any generic file host and just post the link here. You can submit a flow to Enfocus but it takes a few days to get approved.
You can export them and put them on GitHub. That's what I've been doing.
Otherwise you can probably host them at any generic file host and just post the link here. You can submit a flow to Enfocus but it takes a few days to get approved.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
ArielRauch wrote: @Gabriel: tell me what you think:
https://github.com/ArielRauch/Enfocus-Switch.git
Ah, that is a much simpler way of handling it than I thought. I didn't think it would keep the metadata/private data like that between flows but I guess I was wrong. Thanks for sharing!
https://github.com/ArielRauch/Enfocus-Switch.git
Ah, that is a much simpler way of handling it than I thought. I didn't think it would keep the metadata/private data like that between flows but I guess I was wrong. Thanks for sharing!
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
call a (sub) flow and read back result
I will add multi-level support and share - I hate testing by my own:)