ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

Add runtime APIs to call module init, start, stop and function invocations from a Ballerina project

Open gabilang opened this issue 11 months ago • 4 comments

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

gabilang avatar Mar 20 '24 11:03 gabilang