Skip to content
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

Bundle OmniStudio support in the logging framework #90

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Bundle OmniStudio support in the logging framework #90

merged 1 commit into from
Sep 21, 2024

Conversation

jongpie
Copy link
Contributor

@jongpie jongpie commented Sep 18, 2024

Hi @j-fischer - I don't think we've ever had the chance to meet/talk, but we're both logging nerds in the Salesforce ecosystem. I'm the creator of Nebula Logger, and I just added support for OmniStudio yesterday. I saw that you've provided OmniStudio support for a while, but it's not currently bundled into your package because you're using the Vlocity interfaces (in addition to Callable).

From what I've seen, the Vlocity interfaces aren't necessary, you can use just the Callable interface. In Salesforce's docs, it says:

Vlocity Apex classes and the Remote Actions of OmniScripts and Integration Procedures support the Callable interface beginning in the Summer '21 release.

Although the VlocityOpenInterface and VlocityOpenInterface2 interfaces enable flexible implementations with a uniform signature, they reside in the Vlocity managed package and aren't truly Salesforce standards. However, classes that implement VlocityOpenInterface or VlocityOpenInterface2 also implement the Callable Interface, which is a Salesforce standard.

In addition, Remote Actions of OmniScripts and Integration Procedures can invoke any class that implements Callable, regardless of whether it implements VlocityOpenInterface or VlocityOpenInterface2. You specify the Remote Class, Remote Method, and Additional Input properties in the same way for classes that implement any of these interfaces.

By using just the Callable interface, the code can be deployed to any Salesforce org, even if it doesn't have a version of OmniStudio. So, I thought I'd submit a PR with the changes to make your OmniStudio support available out of the box in rflib.

Changes made:

  • Copied your Apex class & test from the wiki page
  • Removed references to the VlocityOpenInterface interface & switched to only use the Callable interface
    • I kept the invokeMethod(), but it's now private - only call() is exposed
  • Updated your test methods to use the call() method (instead of invokeMethod()), and adjusted a few asserts as needed (due to the difference in return values for call() and invokeMethod())
    • I also made a few very minor variable renames for consistency

… removed references to the Vlocity interface/switched to only use the Callable interface
@j-fischer
Copy link
Owner

Hi @jongpie , nice to virtually meet you! It's funny because I saw your release announcement on LI and thought "oh cool, you managed to bundle the support for Omni into your package!" but did not have more time to look further into it.

Thank you for taking the time to actually make the changes on top of sending this note! I just got back from a work trip, let me review why the build is complaining over the weekend and make sure to merge those changes in. I am prepping for a new version but work is currently slowing me down.

And thanks for the amazing work you do with Nebula! 🥳

Cheers

@j-fischer j-fischer added the enhancement New feature or request label Sep 20, 2024
@j-fischer j-fischer added this to the RFLIB 7.2 milestone Sep 20, 2024
@j-fischer j-fischer merged commit 74a5a8f into j-fischer:master Sep 21, 2024
1 check failed
@jongpie
Copy link
Contributor Author

jongpie commented Sep 23, 2024

@j-fischer nice to virtually meet you too, and happy to contribute - you had 99% of the work already done, I just did some very small changes to what you had built 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants