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

Temporary fix for getSerializableNodeInstances compilation failure #3744

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -354,7 +354,6 @@ public int getLevelForNode(String uniqueID) {
return 1;
}

@Override
public Collection<org.kie.api.runtime.process.NodeInstance> getSerializableNodeInstances() {
return getNodeInstances().stream().filter(ForEachNodeInstance::isSerializable).collect(Collectors.toUnmodifiableList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public FieldDescriptor getContextField(GeneratedMessageV3.Builder<?> builder) {
}

protected <T extends NodeInstanceContainer & ContextInstanceContainer & ContextableInstance> WorkflowContext buildWorkflowContext(T nodeInstance) {
List<NodeInstance> nodeInstances = new ArrayList<>(nodeInstance.getSerializableNodeInstances());
List<NodeInstance> nodeInstances = new ArrayList<>(nodeInstance.getNodeInstances());
List<ContextInstance> exclusiveGroupInstances = nodeInstance.getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP);
VariableScopeInstance variableScopeInstance = (VariableScopeInstance) nodeInstance.getContextInstance(VariableScope.VARIABLE_SCOPE);
List<Map.Entry<String, Object>> variables = (variableScopeInstance != null) ? new ArrayList<>(variableScopeInstance.getVariables().entrySet()) : Collections.emptyList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void buildWorkflowContext() {
ArgumentCaptor<List<Map.Entry<String, Integer>>> iterationlevelsCapture = ArgumentCaptor.forClass(ArrayList.class);
verify(spiedProtobufProcessInstanceWriter).buildWorkflowContext(nodeInstancesCapture.capture(), exclusiveGroupInstancesCapture.capture(), variablesCapture.capture(),
iterationlevelsCapture.capture());
Collection<NodeInstance> expected = nodeInstance.getSerializableNodeInstances();
Collection<NodeInstance> expected = nodeInstance.getNodeInstances();
List<NodeInstance> retrieved = nodeInstancesCapture.getValue();
assertThat(retrieved).isNotNull().hasSize(expected.size()).allMatch(expected::contains);
}
Expand Down
Loading