cancel
Showing results for 
Search instead for 
Did you mean: 

Starting workflow from java main class gives error but works fine in Activiti-explorer

jai-prakash_yad
Champ in-the-making
Champ in-the-making
Hi Experts,

I am trying to start workflow (which is using a custom form property named 'sbu')instance from java main class is giving me error.
But while starting the workflow instance from activiti-explorer is working fine. I also tried by putting same 'activiti-explorer-5.20.0.jar' which i have deployed into activiti-explorer application for the custom form properties. Any help or pointer in this regard would be appreciated.

Regards,
Jai



Error:
Exception in thread "main" org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'sbu' sbu
   at org.activiti.engine.impl.form.FormTypes.parseFormPropertyType(FormTypes.java:55)
   at org.activiti.engine.impl.form.DefaultFormHandler.parseConfiguration(DefaultFormHandler.java:61)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.parseTaskDefinition(UserTaskParseHandler.java:59)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.executeParse(UserTaskParseHandler.java:52)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.executeParse(UserTaskParseHandler.java:38)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:81)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractFlowNodeBpmnParseHandler.parse(AbstractFlowNodeBpmnParseHandler.java:27)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractActivityBpmnParseHandler.parse(AbstractActivityBpmnParseHandler.java:36)
   at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:433)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.transformProcess(ProcessParseHandler.java:88)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:49)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:35)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:81)
   at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:400)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:233)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:136)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:58)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:185)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKey(DeploymentManager.java:147)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:79)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

You need to register the sbu form type in the process engine configuration property customFormTypes before you can use a custom form type.

Best regards,

Hi Tijs,

Thank you very much for your help.

The issue has been fixed , the problem was my main class code was using activiti.cfg.xml .As part of custom form property type, implemented into actoviti-explorer app was using activiti-custom-context.xml. so activiti.cfg.xml was overriding the changes now by making entries for custom form type into activiti.cfg.xml resolved the issue.

Thanks

Regards,
Jai