All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.bonita.services.EventService Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2010-2013 BonitaSoft S.A.
 * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation
 * version 2.1 of the License.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this
 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA  02110-1301, USA.
 **/
package org.ow2.bonita.services;

import java.util.List;
import java.util.Set;

import org.ow2.bonita.facade.uuid.ActivityDefinitionUUID;
import org.ow2.bonita.facade.uuid.ActivityInstanceUUID;
import org.ow2.bonita.facade.uuid.ProcessDefinitionUUID;
import org.ow2.bonita.facade.uuid.ProcessInstanceUUID;
import org.ow2.bonita.runtime.event.EventCouple;
import org.ow2.bonita.runtime.event.EventInstance;
import org.ow2.bonita.runtime.event.IncomingEventInstance;
import org.ow2.bonita.runtime.event.Job;
import org.ow2.bonita.runtime.event.OutgoingEventInstance;

/**
 * 
 * @author Charles Souillard, Matthieu Chaffotte
 * 
 */
public interface EventService {

  void fire(OutgoingEventInstance outgoing);

  void subscribe(IncomingEventInstance incoming);

  Set getIncomingEvents();

  IncomingEventInstance getIncomingEvent(long incomingId);

  Set getIncomingEvents(String eventName, String toProcessName, String toActivityName,
      ActivityInstanceUUID actiivtyUUID);

  Set getBoundaryIncomingEvents(ActivityInstanceUUID activityUUID);

  Set getOutgoingEvents();

  OutgoingEventInstance getOutgoingEvent(long outgoingId);

  Set getOutgoingEvents(String eventName, String toProcessName, String toActivityName,
      ActivityInstanceUUID actiivtyUUID);

  Set getBoundaryOutgoingEvents(ActivityInstanceUUID activityUUID);

  Set getOverdueEvents();

  void removeSubscriptions(ProcessInstanceUUID instanceUUID);

  void removeSubscriptions(ActivityDefinitionUUID activityUUID);

  void removeEvent(EventInstance outgoing);

  void removeFiredEvents(ProcessInstanceUUID instanceUUID);

  void enableEventsInFailureIncomingEvents(ActivityInstanceUUID activityUUID);

  Set getOutgoingEvents(ProcessInstanceUUID instanceUUID);

  IncomingEventInstance getIncomingEvent(ProcessInstanceUUID instanceUUID, String name);

  void enablePermanentEventsInFailure(ActivityDefinitionUUID activityUUID);

  Set getSignalIncomingEvents(String signal);

  Set getIncomingEvents(ProcessInstanceUUID instanceUUID);

  Set getIncomingEvents(ActivityInstanceUUID activityUUID);

  IncomingEventInstance getSignalStartIncomingEvent(List processNames, String signalCode);

  List getMessageStartIncomingEvents(Set processNames);

  void storeJob(Job job);

  Job getJob(Long jobId);

  void removeJob(Job job);

  void removeJob(ActivityDefinitionUUID activityUUID);

  List getExecutableJobs(String processUUID);
  
  List getNonLockedProcessesHavingJobs(Set lockedProcessUUIDs, int maxResult);

  Long getNextJobDueDate(final Set processUUIDsToExclude);

  List getMessageEventCouples();

  List getJobs();

  void removeJobs(String executionEventUUID);

  void removeJobs(ProcessInstanceUUID instanceUUID);

  List getTimerJobs();

  List getTimerJobs(ProcessInstanceUUID instanceUUID);

  List getTimerJobs(String eventUUID);

  List getJobsWithoutProcessUUID(int fromIndex, int maxResults);

  List getCorrelationKeyMessageEventCouples(int maxCouples);

  Long getNextEventDueDate();

  Long getNextExpressionEventDueDate();

  void lockRootInstance(ProcessInstanceUUID rootInstanceUUID);

  void lockProcessDefinition(ProcessDefinitionUUID definitionUUID);

  void removeLock(ProcessDefinitionUUID definitionUUID);

  void removeLock(ProcessInstanceUUID rootInstanceUUID);

  List getMessageEventSubProcessIncomingEvents(ProcessInstanceUUID eventSubProcessRootInstanceUUID, long outgoingId);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy