[jboss-user] [jBPM] - Cannot instantiate abstract class or interface
dearest555
do-not-reply at jboss.com
Wed Dec 7 21:39:09 EST 2011
dearest555 [http://community.jboss.org/people/dearest555] created the discussion
"Cannot instantiate abstract class or interface"
To view the discussion, visit: http://community.jboss.org/message/640479#640479
--------------------------------------------------------------
Hi,
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());
}
}
}
#
<
task g=++"186,155,123,52"++ name=++"Supervisor Review"++>
<assignment-handler auto-wire=++"true"++ class=++"com.dear.workflow.task.assigment.AssignByOrganization"++>
<field name=++"type"++>
<string value=++"supervisor"++/>
</field>
</assignment-handler>
<notification/>
<!--<reminder duedate="2 minutes" repeat="10 seconds"/>
-->
<transition g=++"464,134:-36,-18"++ name=++"deny"++ to=++"notify deny"++/>
<transition g=++"5,-16"++ name=++"approve"++ to=++"Finance Review"++/>
</task>
-
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/640479#640479]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111207/0b64b642/attachment-0001.html
More information about the jboss-user
mailing list