Cannot run an application
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2010 08:05 AM
Hello
I have two files, a deployer file and an executor file. The deployer file just deploys resources and executer file executes it.
Here is the deployer code
This works fine.
Generator code
This code gives an exception
I have also attached the resources.
The same files work as junit test.
Please help
Thank you
parul
I have two files, a deployer file and an executor file. The deployer file just deploys resources and executer file executes it.
Here is the deployer code
public class UseCaseIndexerCreateWidgetDeployer { public static void main(String [] args) { ProcessEngine processEngine = new ProcessEngineBuilder() .configureFromResource("activiti.cfg.xml").buildProcessEngine(); RepositoryService repositoryService = processEngine.getRepositoryService(); DeploymentBuilder deployment = repositoryService.createDeployment(); deployment.addClasspathResource("org/idika/galaxy/usecase1/forms/UsecaseIndexerCreateWidget.bpmn20.xml"); deployment.addClasspathResource("org/idika/galaxy/usecase1/forms/search_document.form"); deployment.addClasspathResource("org/idika/galaxy/usecase1/forms/create_widget.form"); deployment.name("UsecaseIndexer"); deployment.deploy(); //repositoryService.deleteDeployment("110"); processEngine.close(); System.out.println("Finished deploying"); }}
This works fine.
Generator code
processEngine = new ProcessEngineBuilder().configureFromResource("activiti.cfg.xml").buildProcessEngine(); runtimeService = processEngine.getRuntimeService(); formService = processEngine.getFormService(); repositoryService = processEngine.getRepositoryService(); taskService = processEngine.getTaskService(); Object startForm = formService.getRenderedStartForm("usecase_indexer_createwidget:1"); System.out.println("Start search form … "+ startForm); Map<String, Object> variables = new HashMap<String, Object>(); String fname = "app_fn"; String lname="app_ln"; variables.put("firstName", fname); variables.put("lastName", lname); variables.put("doc_found", Boolean.FALSE); ProcessInstance pi = runtimeService.startProcessInstanceByKey("usecase_indexer_createwidget", variables); TaskQuery taskquery = taskService.createTaskQuery(); Task task = taskquery.processInstanceId(pi.getId()).singleResult(); processEngine.close(); System.out.println("Finished Indexer Usecase flow");
This code gives an exception
Nov 29, 2010 6:24:47 PM org.activiti.engine.impl.ProcessEngineImpl <init>INFO: ProcessEngine default createdNov 29, 2010 6:24:47 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deployINFO: Processing resource org/idika/galaxy/usecase1/forms/create_widget.formNov 29, 2010 6:24:47 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deployINFO: Processing resource org/idika/galaxy/usecase1/forms/UsecaseIndexerCreateWidget.bpmn20.xmlNov 29, 2010 6:24:48 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributesINFO: XMLSchema currently not supported as typeLanguageNov 29, 2010 6:24:48 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributesINFO: XPath currently not supported as typeLanguageNov 29, 2010 6:24:48 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deployINFO: Processing resource org/idika/galaxy/usecase1/forms/search_document.formjava.lang.NullPointerException at org.activiti.engine.impl.form.JuelFormEngine.getFormTemplateString(JuelFormEngine.java:58) at org.activiti.engine.impl.form.JuelFormEngine.renderStartForm(JuelFormEngine.java:34) at org.activiti.engine.impl.cmd.GetRenderedStartFormCmd.execute(GetRenderedStartFormCmd.java:61) …..
I have also attached the resources.
The same files work as junit test.
Please help
Thank you
parul
Labels:
- Labels:
-
Archive
src.zip
5 KB
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2010 08:37 AM
Hi,
Looks like your formKey is invalid:
<startEvent id="StartNoneEvent_2" activiti:formKey="org/activiti/examples/taskforms/search_document.form"/>
Should be something like "org/idika/galaxy/usecase1/forms/search_document.form" -> path inside the deployed BAR
Looks like your formKey is invalid:
<startEvent id="StartNoneEvent_2" activiti:formKey="org/activiti/examples/taskforms/search_document.form"/>
Should be something like "org/idika/galaxy/usecase1/forms/search_document.form" -> path inside the deployed BAR
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2010 09:16 AM
Right! and so it worked with junit.
Thank you for a quick reply.
–
parul
Thank you for a quick reply.
–
parul
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2010 09:31 AM
hello again,
I ran deployer again after changing bpmn formKey. but still it gives the same error. does it not override with the same deployment name? Do I have to delete all previous deployments? if so please guide.
Thank you
–
parul
I ran deployer again after changing bpmn formKey. but still it gives the same error. does it not override with the same deployment name? Do I have to delete all previous deployments? if so please guide.
Thank you
–
parul
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2010 09:40 AM
ok now I got a solution from this thread :http://forums.activiti.org/en/viewtopic.php?f=3&t=500&p=2048&hilit=multiple+deployments#p2048
Thank you
–
parul
Thank you
–
parul
