}
public void process() {
Session session = EnvironmentImpl.getFromCurrent(Session.class);
Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
session.load(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
historyTaskInstance.setEndTime(Clock.getCurrentTime());
historyTaskInstance.setTransitionName(outcome);
HistoryTaskImpl historyTask = historyTaskInstance.getHistoryTask();
historyTask.setOutcome(outcome);
historyTask.setEndTime(Clock.getCurrentTime());
historyTask.setState(HistoryTask.STATE_COMPLETED);
session.update(historyTaskInstance);