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

[Backport stable/8.1] Add activatedElementInstanceKeys to modification record template #10734

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"index_patterns": [
"zeebe-record_process-instance-modification_*"
],
"composed_of": ["zeebe-record"],
"composed_of": [
"zeebe-record"
],
"priority": 20,
"version": 1,
"template": {
Expand Down Expand Up @@ -48,6 +50,9 @@
}
}
}
},
"activatedElementInstanceKeys": {
"type": "long"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ public List<ProcessInstanceModificationActivateInstructionValue> getActivateInst
.toList();
}

@Override
public Set<Long> getActivatedElementInstanceKeys() {
return activatedElementInstanceKeys.stream()
.map(LongValue::getValue)
.collect(Collectors.toSet());
}

/** Returns true if this record has terminate instructions, otherwise false. */
@JsonIgnore
public boolean hasTerminateInstructions() {
Expand All @@ -104,12 +111,6 @@ public ProcessInstanceModificationRecord addActivateInstruction(
return this;
}

public Set<Long> getActivatedElementInstanceKeys() {
return activatedElementInstanceKeys.stream()
.map(LongValue::getValue)
.collect(Collectors.toSet());
}

public ProcessInstanceModificationRecord addActivatedElementInstanceKey(final long key) {
activatedElementInstanceKeys.add().setValue(key);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.camunda.zeebe.protocol.record.RecordValue;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.immutables.value.Value;

@Value.Immutable
Expand All @@ -32,6 +33,8 @@ public interface ProcessInstanceModificationRecordValue
/** Returns a list of activate instructions (if available), or an empty list. */
List<ProcessInstanceModificationActivateInstructionValue> getActivateInstructions();

Set<Long> getActivatedElementInstanceKeys();

@Value.Immutable
@ImmutableProtocol(
builder = ImmutableProcessInstanceModificationTerminateInstructionValue.Builder.class)
Expand Down