-
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
f31848d
commit c71d2ed
Showing
81 changed files
with
2,389 additions
and
1,500 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
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.
45 changes: 45 additions & 0 deletions
45
.../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,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...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,30 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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.