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

Show registered workflows and Activities #953

Merged
merged 34 commits into from
Feb 16, 2024
Merged
Changes from 15 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7bfabaf
Show registered workflow
addjuarez Nov 9, 2023
b35ebc8
Add `NewWorkflowOption` to config version, time, input, etc when star…
kaibocai Nov 6, 2023
cbe909d
Update CLI link in example readme's (#951)
eNeRGy164 Nov 13, 2023
538f634
remove static
addjuarez Nov 14, 2023
536c0ca
Add determinstic UUID generation (#947)
kaibocai Nov 14, 2023
f42c73c
fix flaky integration test ActorExceptionIT (#954)
MregXN Nov 16, 2023
c54cec5
fix flaky it ActorReminderRecovery (#958)
MregXN Nov 20, 2023
76c2265
fix flaky integration test MethodInvokeIT (#959)
MregXN Nov 20, 2023
878225d
Fix errors
addjuarez Nov 27, 2023
3dcfec8
Merge branch 'master' into workflowLogging
addjuarez Nov 27, 2023
3d8e448
Merge branch 'master' into workflowLogging
addjuarez Nov 28, 2023
9c6e375
Merge branch 'master' into workflowLogging
addjuarez Nov 30, 2023
1b3c586
Merge branch 'master' into workflowLogging
addjuarez Dec 5, 2023
ed520b3
Merge branch 'master' into workflowLogging
addjuarez Dec 11, 2023
1fe698c
Merge branch 'master' into workflowLogging
addjuarez Dec 12, 2023
b272806
make thead safe
addjuarez Dec 21, 2023
cd13a46
Merge branch 'master' into workflowLogging
artursouza Dec 22, 2023
bfc479c
Merge branch 'master' into workflowLogging
dapr-bot Dec 22, 2023
f426932
Merge branch 'master' into workflowLogging
dapr-bot Jan 5, 2024
9a66cf2
Merge branch 'master' into workflowLogging
dapr-bot Jan 5, 2024
01e666d
Merge branch 'master' into workflowLogging
artursouza Jan 8, 2024
6d109da
Merge branch 'master' into workflowLogging
dapr-bot Jan 9, 2024
657d977
Merge branch 'master' into workflowLogging
dapr-bot Jan 11, 2024
ff62f60
Merge branch 'master' into workflowLogging
dapr-bot Jan 13, 2024
67f8398
Merge branch 'master' into workflowLogging
dapr-bot Jan 15, 2024
5b2a225
Merge branch 'master' into workflowLogging
dapr-bot Jan 24, 2024
a0dfe06
Merge branch 'master' into workflowLogging
dapr-bot Feb 8, 2024
8e30bc6
Merge branch 'master' into workflowLogging
mukundansundar Feb 8, 2024
0cdb10b
Merge branch 'master' into workflowLogging
dapr-bot Feb 9, 2024
b5ca6c3
Merge branch 'master' into workflowLogging
dapr-bot Feb 13, 2024
c7bc437
Merge branch 'master' into workflowLogging
dapr-bot Feb 15, 2024
f12ccc4
Merge branch 'master' into workflowLogging
dapr-bot Feb 15, 2024
1493b99
Merge branch 'master' into workflowLogging
artursouza Feb 15, 2024
442686d
Fix code and test.
artursouza Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
import io.dapr.workflows.Workflow;
import io.dapr.workflows.internal.ApiTokenClientInterceptor;
import io.grpc.ClientInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashSet;
import java.util.Set;

public class WorkflowRuntimeBuilder {
private static volatile WorkflowRuntime instance;
private DurableTaskGrpcWorkerBuilder builder;
private static ClientInterceptor WORKFLOW_INTERCEPTOR = new ApiTokenClientInterceptor();
private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowRuntimeBuilder.class);
private volatile Set<String> activitySet = new HashSet<String>();
artursouza marked this conversation as resolved.
Show resolved Hide resolved
private volatile Set<String> workflowSet = new HashSet<String>();

public WorkflowRuntimeBuilder() {
this.builder = new DurableTaskGrpcWorkerBuilder().grpcChannel(
Expand All @@ -42,6 +49,8 @@ public WorkflowRuntime build() {
}
}
}
LOGGER.info("List of registered workflows: " + this.workflowSet);
LOGGER.info("List of registered activites: " + this.activitySet);
return instance;
}

Expand All @@ -56,7 +65,7 @@ public <T extends Workflow> WorkflowRuntimeBuilder registerWorkflow(Class<T> cla
this.builder = this.builder.addOrchestration(
new OrchestratorWrapper<>(clazz)
);

this.workflowSet.add(clazz.getCanonicalName());
return this;
}

Expand All @@ -70,5 +79,6 @@ public <T extends WorkflowActivity> void registerActivity(Class<T> clazz) {
this.builder = this.builder.addActivity(
new ActivityWrapper<>(clazz)
);
this.activitySet.add(clazz.getCanonicalName());
}
}
Loading