Open aphecetche opened 6 years ago
Yes, correct, so you would like to have a way to attach a DPL input signature to something which is effectively using an external source, correct? I think it's a valid use case, albeit I need to think how this could be done.
I am working on something which could provide this as a side effect.
So I think this can be modelled using a special "lifetime" (say "External"). The idea would be that the record expires immediately and it triggers a Receive on a channel which gets configured with appropriate ConfigParamSpecs
(possibly constructed by default and injected in the configuration automatically, if not yet present. How does that sound?
well, I've been disconnected from the DPL for a while, so I guess I first have to get back to it a bit before I can comprehend your comment ;-)
Ok. ;-) I am away this week. I can prepare you an example once I am back.
Question summary
If I understand correctly (and that's not granted ;-) ) how ExternalFairMQDeviceProxy works , its main usage is to inject data into a DPL workflow, i.e. a DPL workflow using such a proxy knows only about what the proxied device is supposed to create, not what it requires as inputs.
So the question is whether there is a way to express the input requirement as well, and thus freely mix and match DPL and non-DPL devices within a DPL-controlled workflow ?
Use case
For instance, I was trying to make a simple workflow :
hit-generator -> digitizer -> pre-clusterizer
where hit-generator is a "sampler" (only output), digitizer a "processor" (input and output) and pre-clusterizer a "sink" (no output).
schematically :
This works fine.
Now what if I want to replace the middle device (digitizer) by an external one ?
I tried to replace the mch-digitizer spec by a spec using a proxy :
but then it seems my workflow no longer knows that the first step should be the hit-generator :
which I assume is to be expected as the fact that the digotizer consumes the output from the hit-generator is not explicitly expressed in the workflow, am I right ? Or do I just misunderstand something basic that would allow to perform what I want ?