-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Callable implementation #371
Comments
Hi @tscottdev, thanks for the suggestion! Is there any chance you could share some of your POC code? Conceptually, I'm not a big fan of the |
Thanks for the reply. I've just got a few hoops to jump through with the company I work for before I can send over the POC code. As soon as I get a green light I'll send it over. :) |
Hi @jongpie, sorry for the delay. I've shared a repo with you that has some POC code in. |
Hi @tscottdev, thanks for sharing the repo with me! I won't be able to fully review it for a few days, but I'll try to review it & share my thoughts hopefully by this weekend. |
@tscottdev I've been tinkering with this idea some more, and unfortunately, it feels like too much extra code would be needed, and it would be difficult to support & maintain this feature (at least at this time). From a scalability perspective, it would be a big initial undertaking to make this work for all functionality in the current codebase, and it would become increasingly difficult to add support for new methods & functionality that are added to Nebula Logger in future releases. At least for now, I'm not going to move forward with adding this to the unlocked or managed packages. But, another viable approach for optionally leveraging Nebula (when a customer does have it installed) is to create your own plugin/adapter package that depends on both your package and Nebula Logger's package. @jamessimone uses this approach in his project Apex Rollup. It avoids having a hard dependency in your primary package on Nebula Logger, while still providing a way to optionally integrate with Nebula Logger in customer orgs that have both installed. In Apex Rollup....
Based on the repo you shared, it feels like you already have a lot of the same concepts & approaches that @jamessimone has taken - the main difference is that you're using the
I think using a plugin package is a better solution overall (and wouldn't require any changes within Nebula Logger), but would love to hear your thoughts on this approach. |
Winter '23 enables Apex to run Invocable Actions dynamically. Here are the docs for the Invocable.Action classes and methods: Example usage for FlowLogEntry// create the action by name, then setup one invocation
Invocable.Action.createCustomAction('apex', 'Nebula', 'FlowLogEntry')
.setInvocationParameter('savelog', true)
.setInvocationParameter('flowname', 'Test')
.setInvocationParameter('message', 'log_message')
.invoke(); However it doesn't work with the unlocked package due to a platform bug (Case 46476985) |
@tscottdev almost 2 years after you opened this issue, and after reconsidering our discussion here.... I've decided that I am going to finally implement the
I've already built a functioning implementation that can be used for ISVs/package developers - I'm now working on expanding it to also handle OmniStudio's functionality. My hope is to have a PR ready in the coming weeks (as soon as the OmniStudio part is ready). |
This is exciting! |
@tscottdev it's finally here! A new
|
New Feature Summary
I've been doing some POC for an implementation that provides a Callable interface to wrap the basic logging methods so that you can make use of the logger without having to create a hard package dependency. This is particularly useful if you want to add logging to your code but don't want to force your customers to have the nebula package installed. The package can then be installed during a period of investigation and later removed. I've written a callable implementation to wrap some of the basic functionality. If this is of interest to the project, I'd be happy to contribute this.
The text was updated successfully, but these errors were encountered: