-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
Description
Area
Area/CompilerPlugin
Description
The following initial code modifications are needed
User code
import ballerina/workflow;
service "myworkflow" on new workflow:Listener() {
remote function execute() returns string {
var result = foo();
return "Hello, World!";
}
@workflow:Signal
remote function onSignal(string msg) {
log:printInfo("Signal received: " + msg);
}
}
@workflow:Activity
function foo() returns int {
}Desugared Code
import ballerina/workflow;
import ballerina/workflow.internal as wfl;
//# Annotation to specify the workflow activities attached to a workflow service
//#
//# # Deprecated
//# Usage of this annotation is discouraged. This is an internal annotation.
//@deprecated
//public annotation map<function> __WorkflowActivities on service;
wfl:__WorkflowActivities {
"foo" : foo;
}
service "myworkflow" on new workflow:Listener() {
remote function execute() returns string {
var result = foo(); // wfl:invokeActivity("foo");
var res2 = int:fromString(foo());
return "Hello, World!";
}
@workflow:Signal
remote function onSignal(string msg) {
log:printInfo("Signal received: " + msg);
}
}Tasks:
- Scan all current modules' function calls with @activity annotation inside the execute method and desguar them into internal:invokeActivity()
Version
No response
Reactions are currently unavailable