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
Workflow through WorkflowReader.readWorkflow(file);
- Create a
SyntheticBean recording the Workflow:
+ public Supplier<WorkflowDefinition> workflowDefinitionSupplier(Workflow workflow) {
+ return () -> {
+ try {
+ final WorkflowApplication app = Arc.container().instance(WorkflowApplication.class).get();
+ return app.workflowDefinition(workflow);
+ } catch (Exception 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:
Possible solutions
- Add setters to
TaskItem at UnevaluatedPropertiesRule something like GeneratorUtils#getterMethod. And, change the String literalUri to String.
Context
It is not an issue but we need to discuss a pain from
quarkiverse/quarkus-flowextension.Trying to solve the quarkiverse/quarkus-flow#50 issue where is expected to:
WorkflowthroughWorkflowReader.readWorkflow(file);SyntheticBeanrecording theWorkflow:Problem
It is not possible to record the
TaskItemobject, because it is read-only and it is not possible to record theURIfromUriTemplate#literalUribeacuseURIis read-only too and not serializable-friendly.References:
Possible solutions
TaskItematUnevaluatedPropertiesRulesomething likeGeneratorUtils#getterMethod. And, change theString literalUrito String.