Closed evshvarov closed 4 years ago
Could be implemented similar to what we have in %Installer: declare the defaults for parameters at the beginning of the module and substitute to transferred values in the call
You can already do this. In the command line, add -DParamName=Value - this goes into subscripts of the params array
wow. That's neat. And how to declare the default parameter?
On Thu, Feb 20, 2020 at 2:57 PM Tim Leavitt notifications@github.com wrote:
You can already do this. In the command line, add -DParamName=Value - this goes into subscripts of the params array
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/intersystems-community/zpm/issues/37?email_source=notifications&email_token=AAVHEP3XWTIU4IFWGPMK4W3RD2D6LA5CNFSM4KYMM7WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMOCALA#issuecomment-589045804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVHEP5KLH5LSFTHDSBU7FDRD2D6LANCNFSM4KYMM7WA .
@evshvarov looks like the fork from the HS package manager was before that feature was added. It'd be fairly straightforward to port. I'll send internal references over an ISC-only back channel. ;)
The other missing piece for this pattern (which I'd recommend) would be support for arbitrary parameter names in %ZPM.PackageManager.Developer.Processor.Abstract:%Evaluate
Note that in command line -> COS, -DParamName.Something.Foo=Value translates to pParams("ParamName","Something","Foo") = "Value".
@timleavitt , how can I refer to the parameter inside the module?
You have access to the params array in the installer as well as resource processor class *Phase methods. If it's something that you want to persist, you can just stuff it in a global from the appropriate place (of those options).
@evshvarov I think so? Real test is, does it work? (I'm not super familiar with Invokes since that's not part of the original HS package manager.)
For example the name of the REST application, or parameters for post-install methods