Skip to content

Conversation

tsurdilo
Copy link
Contributor

… well as uri reference to external resource

Signed-off-by: Tihomir Surdilovic tsurdilo@redhat.com

Many thanks for submitting your Pull Request ❤️!

Please specify parts this PR updates:

  • [ x] Specification
  • [ x] Schema
  • Examples
  • Usecases
  • Extensions
  • Roadmap
  • Use Cases
  • Community
  • TCK
  • Other

What this PR does / why we need it:

Allows not only existing inline-definitions of functions / events but also to reference external resource (via URI), for example:

  1. Workflow definition:
{  
   "id": "sampleWorkflow",
   "version": "1.0",
   "name": "Sample Workflow",
   "description": "Sample Workflow",
   "functions": "http://myhost:8080/functiondefs.json",
   "events": "http://myhost:8080/eventsdefs.json",
   "states":[
     ...
   ]
}
  1. Function definitions resource (functiondefs.json)
{
   "functions": [
      {
         "name":"HelloWorldFunction",
         "resource":"https://hellworldservice.test.com:8443/api/hellofunction"
      }
   ]
}
  1. Event definitions resource (eventsdefs.json)
{
   "events": [
      {  
         "name": "ApplicantInfo",
         "type": "org.application.info",
         "source": "applicationssource",
         "correlation": [
          { 
            "contextAttributeName": "applicantId"
          } 
         ]
      }
   ]
}

… well as uri reference to external resource

Signed-off-by: Tihomir Surdilovic <tsurdilo@redhat.com>
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nice!

@tsurdilo tsurdilo merged commit bb5fa9f into serverlessworkflow:master Sep 27, 2020
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

Successfully merging this pull request may close these issues.

2 participants