Skip to content

Commit

Permalink
[kie-issues-249] Data index improvements (#5529)
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Oct 18, 2023
1 parent d706f2c commit 3dc985a
Show file tree
Hide file tree
Showing 10 changed files with 337 additions and 0 deletions.
37 changes: 37 additions & 0 deletions kie-api/src/main/java/org/kie/api/event/usertask/Attachment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.api.event.usertask;

import java.net.URI;
import java.util.Date;

public interface Attachment {

String getAttachmentId();

String getAttachmentName();

URI getAttachmentURI();

String getUpdatedBy();

Date getUpdatedAt();

}
34 changes: 34 additions & 0 deletions kie-api/src/main/java/org/kie/api/event/usertask/Comment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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.api.event.usertask;

import java.util.Date;

public interface Comment {

String getCommentId();

String getCommentContent();

String getUpdatedBy();

Date getUpdatedAt();

}
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.api.event.usertask;

public interface UserTaskAssignmentEvent extends UserTaskEvent {

String getAssignmentType();

String[] getNewUsersId();

String[] getOldUsersId();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.api.event.usertask;

public interface UserTaskAttachmentEvent extends UserTaskEvent {

Attachment getOldAttachment();

Attachment getNewAttachment();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.api.event.usertask;

public interface UserTaskCommentEvent extends UserTaskEvent {

Comment getOldComment();

Comment getNewComment();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* 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.api.event.usertask;

import java.util.Map;

import org.kie.api.runtime.process.WorkItem;

/**
* An event when a dealine for task has expired
*/
public interface UserTaskDeadlineEvent extends UserTaskEvent {

enum DeadlineType {
Started,
Completed
}

/**
* Returns work item which timeout expires
*
* @return work item
*/
WorkItem getWorkItem();

/**
* Returns notification data
*
* @return key-value pair list
*/
Map<String, Object> getNotification();

/**
* Returns dealine type
*
* @return not started or not completed
*/
DeadlineType getType();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* 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.api.event.usertask;

import java.util.Date;

import org.kie.api.event.KieRuntimeEvent;
import org.kie.api.runtime.process.NodeInstance;
import org.kie.api.runtime.process.ProcessInstance;
import org.kie.api.runtime.process.WorkItem;

/**
* A runtime event related to the execution of process instances.
*/
public interface UserTaskEvent
extends
KieRuntimeEvent {

/**
* The ProcessInstance this event relates to.
*
* @return the process instance
*/
ProcessInstance getProcessInstance();

NodeInstance getNodeInstance();

WorkItem getWorkItem();

String getUserTaskId();

String getUserTaskDefinitionId();

/**
* Returns exact date when the event was created
* @return time when event was created
*/
Date getEventDate();

/**
* @return associated identity that performed the event
*/
String getEventUser();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* 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.api.event.usertask;

public interface UserTaskStateEvent extends UserTaskEvent {



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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.api.event.usertask;

public interface UserTaskVariableEvent extends UserTaskEvent {

enum VariableEventType {
INPUT, OUTPUT
}

String getVariableName();

Object getOldValue();

Object getNewValue();

VariableEventType getVariableType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ public interface ProcessInstance
*/
String getParentProcessInstanceId();

String getProcessVersion();

}

0 comments on commit 3dc985a

Please sign in to comment.