53 lines
1.1 KiB
Plaintext
Executable File
53 lines
1.1 KiB
Plaintext
Executable File
/*
|
|
*
|
|
*/
|
|
package com.fp.bpmlib.transaction.task;
|
|
|
|
import com.fp.bpmlib.task.client.TaskUtil;
|
|
import com.fp.dto.rules.TransactionRule;
|
|
import com.fp.dto.save.SaveRequest;
|
|
|
|
// TODO: Auto-generated Javadoc
|
|
/**
|
|
* Class TaskClaim encargada de.
|
|
*
|
|
* @author gfiallos
|
|
*/
|
|
public class TaskClaim extends TransactionRule {
|
|
|
|
/** Constante serialVersionUID. */
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* Normal process.
|
|
*
|
|
* @param pReq the req
|
|
* @return save request
|
|
* @throws Exception la exception
|
|
*/
|
|
@Override
|
|
public SaveRequest normalProcess(SaveRequest pReq) throws Exception {
|
|
Long tid = pReq.getLong(TaskUtil.BPM_TID);
|
|
TaskUtil t = new TaskUtil(tid);
|
|
try {
|
|
t.claim(pReq.getUser());
|
|
} finally {
|
|
t.close();
|
|
}
|
|
return pReq;
|
|
}
|
|
|
|
/**
|
|
* Reverse process.
|
|
*
|
|
* @param pReq the req
|
|
* @return save request
|
|
* @throws Exception la exception
|
|
*/
|
|
@Override
|
|
public SaveRequest reverseProcess(SaveRequest pReq) throws Exception {
|
|
return pReq;
|
|
}
|
|
|
|
}
|