Cannot instantiate abstract class or interface
dearest555 Dec 7, 2011 9:39 PMHi,
I 'm newbie in JBPM. I try to do assign handler but I got an error message.
Caused by: org.hibernate.InstantiationException Cannot instantiate abstract class or interface: com.mmm.workflow.bom.Document -file : process.jpdl.xml
package com.dear.workflow.task.assigment;
import org.apache.commons.lang.StringUtils;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.task.Assignable;
import com.dear.common.bom.Employee;
import com.dear.workflow.bom.Document;
import com.trg.search.Search;
public class AssignByOrganization extends AssignmentBase {
public static String ORGANIZATION_TYPE_SUPERVISOR = "supervisor";
public static String ORGANIZATION_TYPE_DIVMGR = "divmgr";
public static String ORGANIZATION_TYPE_DEPTMGR = "deptmgr";
String type;
/* (non-Javadoc)
* @see org.jbpm.api.task.AssignmentHandler#assign(org.jbpm.api.task.Assignable, org.jbpm.api.model.OpenExecution)
*/
public void assign(Assignable assignable, OpenExecution execution)
throws Exception {
String docRefId = (String)execution.getVariable("docRefId");
Search search = new Search(Document.class);
search.addFilterEqual("docRefId", docRefId);
Document document = (Document)generalDAO.searchUnique(search);
//Document document = (Document)execution.getVariable("document");
Employee author = generalDAO.find(Employee.class, StringUtils.rightPad(document.getAuthor().getEmployeeId(), 10, " ").toUpperCase() ).getSupervisor();
//generalDAO.refresh(author);
if(author != null)
{
if(type.equals(ORGANIZATION_TYPE_SUPERVISOR))
assignable.setAssignee(author.getSupervisor().getEmployeeId());
if(type.equals(ORGANIZATION_TYPE_DIVMGR))
assignable.setAssignee(author.getDivisionManager().getEmployeeId());
if(type.equals(ORGANIZATION_TYPE_DEPTMGR))
assignable.setAssignee(author.getDepartmentManager().getEmployeeId());
}
}
}
<
>
>
>
/>
</assignment-handler
>
<!-- <reminder duedate="2 minutes" repeat="10 seconds"/> -->
/>
/>
>
-