[Microcontainer] - couldn't find process definition ERROR
by zhangcht
I add JBPM to the Project of Hibernate ,Spring and Struts. In the Struts Action, I could deploy the ProcessDefinition to the database(MySQL),but when I try to get the ProcessDefinition or deploy a new version of ProcessDefinition, the error occurs:
Here is the code:
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| GraphSession graphSession = jbpmContext.getGraphSession();
| ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("testProcess2");
| ProcessInstance instance = processDefinition.createProcessInstance();
| instance.signal();
| jbpmContext.save(instance);
| jbpmContext.close();
THE ERROR show as:
javax.servlet.ServletException: couldn't find process definition 'hello'
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
Parent().addAttachment(something,someotherthing);
}
else
{
// only to component deployers
unit.addAttachment(something,someotherthing);
}
}
}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215167#4215167
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215167
15 years, 10 months
[Microcontainer] - Re: Attachments eligible for being passed to the deployers?
by jaikiran
"alesj" wrote :
|
| Your #3 deployer is not a component deployer.
|
That's correct.
"alesj" wrote :
| Your #2 puts attachment into component,
| hence it's only component deployers that can see that.
|
Any specific reason for this special treatment? Because after all that is a simple attachment (and not a component) and hence i was considering that it would be visible to non-component deployers.
"alesj" wrote :
| Component deployers should mostly consume attachments
| not creating them - hence the name "component". ;-)
And i thought the name "component" was because they work on components rather than what output they generate :)
So would that mean, the attachment generated by a component deployer is of no pratical use to non-component deployers?
So would this be a clean way of doing things in a component deployer:
| public void deploy(DeploymentUnit unit) throws DeploymentException
| {
| logger.info("Deploying unit : " + unit);
|
| // Am i deploying a component?
| if (unit.isComponent())
| {
| // yes, i am deploying a component
| ...
| // should my attachments be visible to non-component deployers?
| if (shouldMyAttachmentsBeVisibleToAll())
| {
| // should be visible to all, so add to parent
| unit.getParent().addAttachment(something,someotherthing);
| }
| else
| {
| // only to component deployers
| unit.addAttachment(something,someotherthing);
| }
|
| }
|
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215160#4215160
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215160
15 years, 10 months