org.activiti.engine.impl.persistence.entity.EventSubscriptionEntityManager Maven / Gradle / Ivy
/* 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.activiti.engine.impl.persistence.entity;
import org.activiti.bpmn.model.Signal;
import org.activiti.engine.api.internal.Internal;
import org.activiti.engine.impl.EventSubscriptionQueryImpl;
import org.activiti.engine.impl.Page;
import java.util.List;
/**
*/
@Internal
public interface EventSubscriptionEntityManager extends EntityManager {
/* Create entity */
MessageEventSubscriptionEntity createMessageEventSubscription();
SignalEventSubscriptionEntity createSignalEventSubscription();
CompensateEventSubscriptionEntity createCompensateEventSubscription();
/* Create and insert */
SignalEventSubscriptionEntity insertSignalEvent(String signalName, Signal signal, ExecutionEntity execution);
MessageEventSubscriptionEntity insertMessageEvent(String messageName, ExecutionEntity execution);
CompensateEventSubscriptionEntity insertCompensationEvent(ExecutionEntity execution, String activityId);
/* Update */
void updateEventSubscriptionTenantId(String oldTenantId, String newTenantId);
/* Delete */
void deleteEventSubscriptionsForProcessDefinition(String processDefinitionId);
/* Event receival */
void eventReceived(EventSubscriptionEntity eventSubscriptionEntity, Object payload, boolean processASync);
/* Find (generic) */
List findEventSubscriptionsByName(String type, String eventName, String tenantId);
List findEventSubscriptionsByNameAndExecution(String type, String eventName, String executionId);
List findEventSubscriptionsByExecution(String executionId);
List findEventSubscriptionsByExecutionAndType(String executionId, String type);
List findEventSubscriptionsByProcessInstanceAndActivityId(String processInstanceId, String activityId, String type);
List findEventSubscriptionsByTypeAndProcessDefinitionId(String type, String processDefinitionId, String tenantId);
List findEventSubscriptionsByQueryCriteria(EventSubscriptionQueryImpl eventSubscriptionQueryImpl, Page page);
long findEventSubscriptionCountByQueryCriteria(EventSubscriptionQueryImpl eventSubscriptionQueryImpl);
/* Find (signal) */
List findSignalEventSubscriptionsByEventName(String eventName, String tenantId);
List findSignalEventSubscriptionsByProcessInstanceAndEventName(String processInstanceId, String eventName);
List findSignalEventSubscriptionsByNameAndExecution(String name, String executionId);
/* Find (message) */
MessageEventSubscriptionEntity findMessageStartEventSubscriptionByName(String messageName, String tenantId);
List findMessageEventSubscriptionsByProcessInstanceAndEventName(String processInstanceId, String eventName);
/* Find (compensation) */
List findCompensateEventSubscriptionsByExecutionId(String executionId);
List findCompensateEventSubscriptionsByExecutionIdAndActivityId(String executionId, String activityId);
List findCompensateEventSubscriptionsByProcessInstanceIdAndActivityId(String processInstanceId, String activityId);
}