cancel
Showing results for 
Search instead for 
Did you mean: 

New process definition deployment

anil_kandula
Champ in-the-making
Champ in-the-making
Hi,

I am trying to deploy a new process definition using activiti explorer. Bellow is the bpmn 2.0 xml schema file for the process definition.


<?xml version="1.0" encoding="utf-8" ?>

<definitions id="def1"
             targetNamespace="MQ"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:activiti="http://activiti.org/bpmn">

  <process id="financialReport" name="Monthly financial report reminder process">
    <startEvent id="theStart" />
    <sequenceFlow id='flow1' sourceRef='theStart' targetRef='writeReportTask' />
    <userTask id="writeReportTask" name="Write monthly financial report" >
      <documentation>
        Write monthly financial report for publication to shareholders.
      </documentation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>accountancy</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>
    <sequenceFlow id='flow2' sourceRef='writeReportTask' targetRef='verifyReportTask' />
    <userTask id="verifyReportTask" name="Verify monthly financial report" >
      <documentation>
        Verify monthly financial report composed by the accountancy department. This financial report is going to be sent to all the company shareholders.
      </documentation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>management</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>
    <sequenceFlow id='flow3' sourceRef='verifyReportTask' targetRef='theEnd' />
    <endEvent id="theEnd" />
  </process>
</definitions>


While deployment i got the "Error reading xml", but when i validated xml using bpmn validators it is fine.

Regards,
Anil Kumar
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Anil.

any further exception?

Regards
Martin

anil_kandula
Champ in-the-making
Champ in-the-making
Hi Martin,

    Thanks for the reply.

Bellow is the exception stack trace.

<blockcode>
10:37:10,365 [http-bio-8090-exec-9] INFO  org.activiti.engine.impl.bpmn.deployer
.BpmnDeployer  - Processing resource FinancialReportProcess.bpmn20.xml
10:38:49,995 [http-bio-8090-exec-9] INFO  org.activiti.engine.impl.bpmn.deployer
.BpmnDeployer  - Processing resource FinancialReportProcess.bpmn20.xml
Jan 13, 2015 10:38:50 AM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method uploadFini
shed in org.activiti.explorer.ui.custom.UploadComponent failed.
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)

        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219
)
        at com.vaadin.ui.Upload.fireUploadInterrupted(Upload.java:731)
        at com.vaadin.ui.Upload$1.streamingFailed(Upload.java:1037)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToR
eceiver(AbstractCommunicationManager.java:619)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleS
impleMultipartFileUpload(AbstractCommunicationManager.java:476)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(
CommunicationManager.java:259)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(Abs
tractApplicationServlet.java:495)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52
)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:208)
        at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.j
ava:42)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:503)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:421)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1070)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:611)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
        at java.lang.Thread.run(Thread.java:744)
Caused by: org.activiti.bpmn.exceptions.XMLException: Error reading XML
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnX
MLConverter.java:309)
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnX
MLConverter.java:281)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java
:186)
        at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeploy
er.java:112)
        at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(
DeploymentManager.java:50)
        at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:103)
        at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
        at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandIn
voker.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:57)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(Sp
ringTransactionInterceptor.java:47)
        at org.springframework.transaction.support.TransactionTemplate.execute(T
ransactionTemplate.java:133)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransa
ctionInterceptor.java:45)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:31)
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecu
torImpl.java:40)
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecu
torImpl.java:35)
        at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServi
ceImpl.java:78)
        at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(Depl
oymentBuilderImpl.java:156)
        at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiv
er.deployUploadedFile(DeploymentUploadReceiver.java:96)
        at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiv
er.uploadFinished(DeploymentUploadReceiver.java:71)
        at org.activiti.explorer.ui.custom.UploadComponent.uploadFinished(Upload
Component.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)

        … 32 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLS
treamReaderImpl.java:598)
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnX
MLConverter.java:306)
        … 56 more

</blockcode>

Regards,
Anil

martin_grofcik
Confirmed Champ
Confirmed Champ

anil_kandula
Champ in-the-making
Champ in-the-making
Hi Martin,

Wow, the issue has been fixed. That's a great help martin. Thank you very much.

Regards,
Anil.