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

Function type : custom usage #364

Open
mremadevi opened this issue Apr 19, 2024 · 2 comments
Open

Function type : custom usage #364

mremadevi opened this issue Apr 19, 2024 · 2 comments

Comments

@mremadevi
Copy link

Can a function call .net method using function type as 'custom' ?

@JBBianchi
Copy link
Member

Not really. Functions in the Serverless Workflow spec are actually "serverless" functions, not "local" functions of your code. That being said, you could probably implement your own Processor. Know that we invision a new version of Synapse that should be way more flexible on the type of actions you could run but it's still in a conceptual phase (and I know it's been a while but we want to take our time to put the right pieces together).

That being said, may I ask which .NET method are you trying to call ?

@cdavernas
Copy link
Member

cdavernas commented May 26, 2024

@mremadevi With Serverless Workflow v1.0.0-alpha1 you can run any process you'd like, using containers, scripts or shell.

Using v1.0.0-alpha1, to call your custom .NET function, you could:

  1. Compile your function(s) into an executable.
  2. Containerize your function into a new image.
  3. Execute a run process, using the image compiled at step 2.
document:
  dsl: 1.0.0-alpha1
  namespace: default
  name: test
  version: 0.1.0
do:
  callNetFunction:
    run:
      container:
        image: containerizedNetApp

You could also run it using a shell command, or running it as script on a runtime that supports .NET as script.

Another couple of weeks and a new Synapse release supporting said feature will see the day ;)
Does that answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants