-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kie-issues-249] data index improvements
- Loading branch information
1 parent
cb9f921
commit cb382c5
Showing
64 changed files
with
2,109 additions
and
1,317 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
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
106 changes: 0 additions & 106 deletions
106
...ata-index-common/src/main/java/org/kie/kogito/index/event/ProcessInstanceEventMapper.java
This file was deleted.
Oops, something went wrong.
95 changes: 0 additions & 95 deletions
95
...ta-index-common/src/main/java/org/kie/kogito/index/event/UserTaskInstanceEventMapper.java
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
.../src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceErrorDataEventMerger.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,42 @@ | ||
/* | ||
* Copyright 2023 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.kie.kogito.index.event.mapper; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
|
||
import org.kie.kogito.event.process.ProcessInstanceDataEvent; | ||
import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent; | ||
import org.kie.kogito.index.model.ProcessInstance; | ||
import org.kie.kogito.index.model.ProcessInstanceError; | ||
|
||
@ApplicationScoped | ||
public class ProcessInstanceErrorDataEventMerger implements ProcessInstanceEventMerger { | ||
|
||
@Override | ||
public boolean accept(ProcessInstanceDataEvent<?> event) { | ||
return event instanceof ProcessInstanceErrorDataEvent; | ||
} | ||
|
||
@Override | ||
public void merge(ProcessInstance pi, ProcessInstanceDataEvent<?> data) { | ||
ProcessInstanceErrorDataEvent event = (ProcessInstanceErrorDataEvent) data; | ||
ProcessInstanceError error = new ProcessInstanceError(); | ||
error.setMessage(event.getData().getErrorMessage()); | ||
error.setNodeDefinitionId(event.getData().getNodeDefinitionId()); | ||
pi.setError(error); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...ex-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceEventMerger.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,27 @@ | ||
/* | ||
* Copyright 2023 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.kie.kogito.index.event.mapper; | ||
|
||
import org.kie.kogito.event.process.ProcessInstanceDataEvent; | ||
import org.kie.kogito.index.model.ProcessInstance; | ||
|
||
public interface ProcessInstanceEventMerger { | ||
|
||
boolean accept(ProcessInstanceDataEvent<?> event); | ||
|
||
void merge(ProcessInstance pi, ProcessInstanceDataEvent<?> event); | ||
|
||
} |
Oops, something went wrong.