-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10653: [Backport stable/8.1] Remove interrupted state on event subprocess activation r=remcowesterhoud a=backport-action # Description Backport of #10609 to `stable/8.1`. relates to #10477 Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
- Loading branch information
Showing
7 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...main/java/io/camunda/zeebe/engine/state/appliers/ProcessInstanceModifiedEventApplier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under | ||
* one or more contributor license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding copyright ownership. | ||
* Licensed under the Zeebe Community License 1.1. You may not use this file | ||
* except in compliance with the Zeebe Community License 1.1. | ||
*/ | ||
package io.camunda.zeebe.engine.state.appliers; | ||
|
||
import io.camunda.zeebe.engine.state.TypedEventApplier; | ||
import io.camunda.zeebe.engine.state.instance.ElementInstance; | ||
import io.camunda.zeebe.engine.state.mutable.MutableElementInstanceState; | ||
import io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceModificationRecord; | ||
import io.camunda.zeebe.protocol.record.intent.ProcessInstanceModificationIntent; | ||
|
||
final class ProcessInstanceModifiedEventApplier | ||
implements TypedEventApplier< | ||
ProcessInstanceModificationIntent, ProcessInstanceModificationRecord> { | ||
|
||
private final MutableElementInstanceState elementInstanceState; | ||
|
||
public ProcessInstanceModifiedEventApplier( | ||
final MutableElementInstanceState elementInstanceState) { | ||
this.elementInstanceState = elementInstanceState; | ||
} | ||
|
||
@Override | ||
public void applyState(final long key, final ProcessInstanceModificationRecord value) { | ||
value.getActivatedElementInstanceKeys().stream() | ||
.map(elementInstanceState::getInstance) | ||
.filter(ElementInstance::isInterrupted) | ||
.forEach( | ||
instance -> | ||
elementInstanceState.updateInstance( | ||
instance.getKey(), ElementInstance::clearInterruptedState)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters