ballerina-lang
ballerina-lang copied to clipboard
Add runtime APIs to call module init, start, stop and function invocations from a Ballerina project
Purpose
$title
Fixes #42128
Approach
Describe how you are implementing the solutions along with the design details.
Samples
Runtime balRuntime = Runtime.from(new Module("orgName", "moduleName", "majorVersion"));
balRuntime.init();
balRuntime.start();
Object[] args = [];
balRuntime.invokeMethodAsync(“functionName”, args, callback);
balRuntime.stop(“org”, “module”, 1.0.0);
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [ ] Unit Tests
- [ ] Spec Conformance Tests
- [x] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples