ipm
ipm copied to clipboard
Permit phases for <Invoke> not implemented in the lifecycle class
Use case:
I want to add a LoadData phase that I can call via IPM - basically the equivalent of an npm script - that just does something via an <Invoke>. I shouldn't need to create a whole lifecycle class for this, I should just be able to say, for example:
<Invoke Phase="LoadData" Class="LSHPP.Installer" Method="LoadData" />
Right now this fails with <METHOD DOES NOT EXIST> because %Loaddata isn't defined in the Module lifecycle class. We should allow it instead and run the invoke.
@isc-kiyer thoughts on this?
@isc-tleavitt So when would such an invoke run if it is not during a defined phase? What benefit does this give the user vs running before/after the Activate phase?
@isc-kiyer it would be run manually - e..g: zpm "isc.ls.personalization loadData"
In this case it's something that will need to be done on a recurring basis but not necessarily automated as part of (re)installation.
This is sort of similar to https://docs.npmjs.com/cli/v6/using-npm/scripts
@isc-tleavitt ah ok yes I agree this would be useful then. Perhaps though as a different attribute (maybe CustomPhase) to clearly indicate it is not an OOTB phase?
Fixed by #570