-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Context
It is not an issue but we need to discuss a pain from quarkiverse/quarkus-flow extension.
Trying to solve the quarkiverse/quarkus-flow#50 issue where is expected to:
- Get the file containing a workflow descriptor from YAML
- Create a
WorkflowthroughWorkflowReader.readWorkflow(file); - Create a
SyntheticBeanrecording theWorkflow:
+ public Supplier<WorkflowDefinition> workflowDefinitionSupplier(Workflow workflow) {
+ return () -> {
+ try {
+ final WorkflowApplication app = Arc.container().instance(WorkflowApplication.class).get();
+ return app.workflowDefinition(workflow);
+ } catch (RuntimeException re) {
+ throw re;
+ } catch (Throwable e) {
+ throw new RuntimeException("Failed to create WorkflowDefinition for " + workflow, e);
+ }
+ };
+ }Problem
It is not possible to record the TaskItem object, because it is read-only and it is not possible to record the URI from UriTemplate#literalUri beacuse URI is read-only too and not serializable-friendly.
References:
- https://quarkus.io/guides/writing-extensions#bytecode-recording-2
- Add reference to the Bytecode Recording documentation quarkusio/quarkus#50967
Possible solutions
- Add setters to
TaskItematUnevaluatedPropertiesRulesomething likeGeneratorUtils#getterMethod. And, change theString literalUrito String.
Metadata
Metadata
Assignees
Labels
No labels