use of org.jbpm.persistence.api.integration.model.TaskInstanceView in project jbpm by kiegroup.
the class JPATaskPersistenceContext method persistTask.
@Override
public Task persistTask(Task task) {
check();
this.em.persist(task);
if (this.pessimisticLocking) {
this.em.flush();
return this.em.find(TaskImpl.class, task.getId(), LockModeType.PESSIMISTIC_FORCE_INCREMENT);
}
EventManagerProvider.getInstance().get().create(new TaskInstanceView(task));
return task;
}
use of org.jbpm.persistence.api.integration.model.TaskInstanceView in project jbpm by kiegroup.
the class JPATaskPersistenceContext method removeTask.
@Override
public Task removeTask(Task task) {
check();
em.remove(task);
EventManagerProvider.getInstance().get().delete(new TaskInstanceView(task));
return task;
}
use of org.jbpm.persistence.api.integration.model.TaskInstanceView in project jbpm by kiegroup.
the class JPATaskPersistenceContext method removeCommentFromTask.
@Override
public Comment removeCommentFromTask(Comment comment, Task task) {
((InternalTaskData) task.getTaskData()).removeComment(comment.getId());
EventManagerProvider.getInstance().get().update(new TaskInstanceView(task));
return comment;
}
use of org.jbpm.persistence.api.integration.model.TaskInstanceView in project jbpm by kiegroup.
the class JPATaskPersistenceContext method addCommentToTask.
@Override
public Comment addCommentToTask(Comment comment, Task task) {
((InternalTaskData) task.getTaskData()).addComment(comment);
EventManagerProvider.getInstance().get().update(new TaskInstanceView(task));
return comment;
}
use of org.jbpm.persistence.api.integration.model.TaskInstanceView in project jbpm by kiegroup.
the class JPATaskPersistenceContext method updateTask.
@Override
public Task updateTask(Task task) {
check();
Task updated = this.em.merge(task);
EventManagerProvider.getInstance().get().update(new TaskInstanceView(task));
return updated;
}
Aggregations