I can not include my compute module functions in an OSDK application. I can include them in a functions repo, but this defeats the purpose of using compute modules. Compute module functions need the ability to be invoked directly and packaged in OSDK apps just like other actions and functions.
If I understand your use case correctly, I believe this should work today. When registering the CM are you making sure to select the “includeApi” toggle? You then need to register it into a specific ontology to make it available in OSDK.
Screenshots attached:
Can this be done after creating the compute module?
OK I found the option.
However, I could not find this function when adding it to my OSDK app. All I see when I search for “ScheduleMeeting” in my proxy I build in functions v1 as a work around.
Is there some setting I have to enable in the OSDK so include compute module functions?
Yes you can switch the CM functions from a global API to a ontology bound API name via the following steps:
- Open your Compute Module
- Navigate to the functions tab
- Select the function you want to access in the OSDK
- Make sure “IncludeAPI” is selected
- Under “Advanced Configuration” uncheck “Switch to Global API names”
- Select an ontology to publish your functions to
- Hit “update” to apply the changes
Warning: if you were previously using this function in a TSv1 repo changing the API name from global to ontology bound will cause compile time breaks (but shouldn’t cause runtime breaks).
You need to make sure the “Switch to Global API Names” is unchecked for it to be accessible in OSDK.
We have gone ahead and submitted a product fix to make this the default so this will be less confusing going forward.
Screenshot of the setting to change:
OK, I don’t want to break my functions repo that also uses this function. Can I create a new function that is ontology bound without effecting the other functions that are currently used in my functions repo?
Yes a CM can publish both ontology bound and global functions from the same Compute Module.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.