use of org.jbpm.compiler.canonical.descriptors.OpenApiTaskDescriptor in project kogito-runtimes by kiegroup.
the class OpenApiClientWorkItemIntrospector method introspect.
public void introspect(KogitoWorkflowProcess workFlowProcess) {
final List<Node> nodes = workFlowProcess.getNodesRecursively();
if (nodes == null || nodes.isEmpty()) {
return;
}
nodes.stream().filter(OpenApiTaskDescriptor::isOpenApiTask).forEach(node -> {
final OpenApiTaskDescriptor.WorkItemModifier modifier = OpenApiTaskDescriptor.modifierFor((WorkItemNode) node);
final OpenApiClientOperation operation = discoverOperation(modifier.getInterface(), modifier.getOperation());
modifier.modify(operation.getGeneratedClass(), operation.getMethodName(), operation.getParameters().stream().sorted().map(OpenApiClientOperation.Parameter::getSpecParameter).collect(Collectors.toList()));
});
}
Aggregations