Search in sources :

Example 1 with EventDAO

use of org.wso2.carbon.humantask.core.dao.EventDAO in project carbon-business-process by wso2.

the class CommonTaskUtil method populateTaskEventInfo.

/**
 * Create the TaskEventInfo object from the EventDAO and the TaskDAO.
 * @param eventDAO : The event
 * @param taskDAO : The related task dao.
 *
 * @return : The new TaskEventInfo object.
 */
public static TaskEventInfo populateTaskEventInfo(EventDAO eventDAO, TaskDAO taskDAO) {
    TaskEventInfo eventInfo = new TaskEventInfo();
    eventInfo.setTimestamp(eventDAO.getTimeStamp());
    eventInfo.setEventInitiator(eventDAO.getUser());
    eventInfo.setEventType(eventDAO.getType());
    eventInfo.setNewState(eventDAO.getNewState());
    eventInfo.setOldState(eventDAO.getOldState());
    eventInfo.setTaskInfo(populateTaskInfo(taskDAO));
    return eventInfo;
}
Also used : TaskEventInfo(org.wso2.carbon.humantask.core.api.event.TaskEventInfo)

Example 2 with EventDAO

use of org.wso2.carbon.humantask.core.dao.EventDAO in project carbon-business-process by wso2.

the class SetFault method createTaskEvent.

@Override
protected EventDAO createTaskEvent() {
    EventDAO taskEvent = super.createTaskEvent();
    taskEvent.setDetails("");
    return taskEvent;
}
Also used : EventDAO(org.wso2.carbon.humantask.core.dao.EventDAO)

Example 3 with EventDAO

use of org.wso2.carbon.humantask.core.dao.EventDAO in project carbon-business-process by wso2.

the class SetOutput method createTaskEvent.

@Override
protected EventDAO createTaskEvent() {
    EventDAO taskEvent = super.createTaskEvent();
    taskEvent.setDetails("");
    return taskEvent;
}
Also used : EventDAO(org.wso2.carbon.humantask.core.dao.EventDAO)

Example 4 with EventDAO

use of org.wso2.carbon.humantask.core.dao.EventDAO in project carbon-business-process by wso2.

the class AbstractHumanTaskCommand method processTaskEvent.

/**
 */
protected void processTaskEvent() {
    EventDAO eventDAO = createTaskEvent();
    getTask().persistEvent(eventDAO);
    TaskEventInfo taskEventInfo = CommonTaskUtil.populateTaskEventInfo(eventDAO, task);
    getEngine().getEventProcessor().processEvent(taskEventInfo);
}
Also used : EventDAO(org.wso2.carbon.humantask.core.dao.EventDAO) TaskEventInfo(org.wso2.carbon.humantask.core.api.event.TaskEventInfo)

Example 5 with EventDAO

use of org.wso2.carbon.humantask.core.dao.EventDAO in project carbon-business-process by wso2.

the class Activate method createTaskEvent.

@Override
protected EventDAO createTaskEvent() {
    EventDAO taskEvent = super.createTaskEvent();
    taskEvent.setDetails("");
    return taskEvent;
}
Also used : EventDAO(org.wso2.carbon.humantask.core.dao.EventDAO)

Aggregations

EventDAO (org.wso2.carbon.humantask.core.dao.EventDAO)15 TaskEventInfo (org.wso2.carbon.humantask.core.api.event.TaskEventInfo)2 TaskDAO (org.wso2.carbon.humantask.core.dao.TaskDAO)1