}
public void createActivityRecovery(String channel, long activityId, String reason,
Date dateTime, Element data, String[] actions, int retries) {
entering("ProcessInstanceDaoImpl.createActivityRecovery");
HActivityRecovery recovery = new HActivityRecovery();
recovery.setInstance(_instance);
recovery.setChannel(channel);
recovery.setActivityId(activityId);
recovery.setReason(reason);
recovery.setDateTime(dateTime);
recovery.setRetries(retries);
if (data != null) {
recovery.setDetails(DOMUtils.domToBytes(data));
}
String list = actions[0];
for (int i = 1; i < actions.length; ++i)
list += " " + actions[i];
recovery.setActions(list);
// _instance.addRecovery(recovery);
getSession().save(recovery);
_instance.setActivityFailureDateTime(dateTime);
_instance.setActivityFailureCount(_instance.getActivityFailureCount() + 1);
getSession().update(_instance);