use of org.wso2.carbon.humantask.core.engine.commands.Nominate in project carbon-business-process by wso2.
the class TaskOperationsImpl method nominate.
/**
* Nominate an organization entity to process the task. (An Administrative Operation)
* @param taskIdURI : task identifier
* @param nomineeOrgEntity : TOrganizationalEntity
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void nominate(final URI taskIdURI, final TOrganizationalEntity nomineeOrgEntity) throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault, IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().execTransaction(new Callable<Object>() {
public Object call() throws Exception {
List<OrganizationalEntityDAO> nominees = TransformerUtils.transformOrganizationalEntityList(nomineeOrgEntity);
Nominate nominateCommand = new Nominate(getCaller(), taskId, nominees);
nominateCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
Aggregations