ipm icon indicating copy to clipboard operation
ipm copied to clipboard

Permit phases for <Invoke> not implemented in the lifecycle class

Open isc-tleavitt opened this issue 1 year ago • 4 comments

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 avatar Jul 30 '24 13:07 isc-tleavitt

@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 avatar Jul 30 '24 17:07 isc-kiyer

@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.

isc-tleavitt avatar Jul 30 '24 17:07 isc-tleavitt

This is sort of similar to https://docs.npmjs.com/cli/v6/using-npm/scripts

isc-tleavitt avatar Jul 30 '24 17:07 isc-tleavitt

@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?

isc-kiyer avatar Jul 30 '24 17:07 isc-kiyer

Fixed by #570

isc-shuliu avatar Sep 19 '24 12:09 isc-shuliu