Search in sources :

Example 6 with TaskLifeCycleEventListener

use of org.kie.api.task.TaskLifeCycleEventListener in project jbpm by kiegroup.

the class TaskEventSupport method fireAfterTaskReassigned.

public void fireAfterTaskReassigned(final Task task, TaskContext context) {
    final Iterator<TaskLifeCycleEventListener> iter = getEventListenersIterator();
    if (iter.hasNext()) {
        do {
            TaskLifeCycleEventListener listener = iter.next();
            listener.afterTaskReassignedEvent(new TaskEventImpl(task, context));
        } while (iter.hasNext());
    }
}
Also used : TaskLifeCycleEventListener(org.kie.api.task.TaskLifeCycleEventListener)

Example 7 with TaskLifeCycleEventListener

use of org.kie.api.task.TaskLifeCycleEventListener in project jbpm by kiegroup.

the class TaskEventSupport method fireAfterTaskNotified.

public void fireAfterTaskNotified(final Task task, TaskContext context) {
    final Iterator<TaskLifeCycleEventListener> iter = getEventListenersIterator();
    if (iter.hasNext()) {
        do {
            TaskLifeCycleEventListener listener = iter.next();
            listener.afterTaskNotificationEvent(new TaskEventImpl(task, context));
        } while (iter.hasNext());
    }
}
Also used : TaskLifeCycleEventListener(org.kie.api.task.TaskLifeCycleEventListener)

Example 8 with TaskLifeCycleEventListener

use of org.kie.api.task.TaskLifeCycleEventListener in project jbpm by kiegroup.

the class TaskEventSupport method fireAfterTaskAssignmentsAddedEvent.

public void fireAfterTaskAssignmentsAddedEvent(final Task task, TaskContext context, AssignmentType type, List<OrganizationalEntity> entities) {
    final Iterator<TaskLifeCycleEventListener> iter = getEventListenersIterator();
    if (iter.hasNext()) {
        do {
            TaskLifeCycleEventListener listener = iter.next();
            listener.afterTaskAssignmentsAddedEvent(new TaskEventImpl(task, context), type, entities);
        } while (iter.hasNext());
    }
}
Also used : TaskLifeCycleEventListener(org.kie.api.task.TaskLifeCycleEventListener)

Example 9 with TaskLifeCycleEventListener

use of org.kie.api.task.TaskLifeCycleEventListener in project jbpm by kiegroup.

the class TaskEventSupport method fireBeforeTaskNotified.

public void fireBeforeTaskNotified(final Task task, TaskContext context) {
    final Iterator<TaskLifeCycleEventListener> iter = getEventListenersIterator();
    if (iter.hasNext()) {
        do {
            TaskLifeCycleEventListener listener = iter.next();
            listener.beforeTaskNominatedEvent(new TaskEventImpl(task, context));
        } while (iter.hasNext());
    }
}
Also used : TaskLifeCycleEventListener(org.kie.api.task.TaskLifeCycleEventListener)

Example 10 with TaskLifeCycleEventListener

use of org.kie.api.task.TaskLifeCycleEventListener in project jbpm by kiegroup.

the class TaskEventSupport method fireAfterTaskAssignmentsRemovedEvent.

public void fireAfterTaskAssignmentsRemovedEvent(final Task task, TaskContext context, AssignmentType type, List<OrganizationalEntity> entities) {
    final Iterator<TaskLifeCycleEventListener> iter = getEventListenersIterator();
    if (iter.hasNext()) {
        do {
            TaskLifeCycleEventListener listener = iter.next();
            listener.afterTaskAssignmentsRemovedEvent(new TaskEventImpl(task, context), type, entities);
        } while (iter.hasNext());
    }
}
Also used : TaskLifeCycleEventListener(org.kie.api.task.TaskLifeCycleEventListener)

Aggregations

TaskLifeCycleEventListener (org.kie.api.task.TaskLifeCycleEventListener)27 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)6 EventService (org.kie.internal.task.api.EventService)6 JPATaskLifeCycleEventListener (org.jbpm.services.task.audit.JPATaskLifeCycleEventListener)5 RuntimeEngine (org.kie.api.runtime.manager.RuntimeEngine)5 HashMap (java.util.HashMap)4 AbstractBaseTest (org.jbpm.test.util.AbstractBaseTest)4 WorkItemImpl (org.drools.core.process.instance.impl.WorkItemImpl)3 KieSession (org.kie.api.runtime.KieSession)3 RuntimeEnvironment (org.kie.api.runtime.manager.RuntimeEnvironment)3 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)3 EntityManagerFactory (javax.persistence.EntityManagerFactory)2 DefaultTaskEventListener (org.jbpm.services.task.events.DefaultTaskEventListener)2 RegisterableItemsFactory (org.kie.api.runtime.manager.RegisterableItemsFactory)2 TaskEvent (org.kie.api.task.TaskEvent)2 TaskService (org.kie.api.task.TaskService)2 TaskSummary (org.kie.api.task.model.TaskSummary)2 DeploymentDescriptor (org.kie.internal.runtime.conf.DeploymentDescriptor)2 List (java.util.List)1