cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment error when custom stencils are used

neon
Champ in-the-making
Champ in-the-making
Hello, I have an error when I try to deploy my workflow using custom stencils. It looks like my problem comes from XMLException.java but I don't know what to modify. I have the same problem with activiti 5.21.
Here is my localhost.log:


juil. 27, 2016 9:30:21 AM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring FrameworkServlet 'appDispatcher'
juil. 27, 2016 9:30:35 AM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring FrameworkServlet 'dispatcher'
juil. 27, 2016 9:36:07 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [appDispatcher] in context with path [/activiti-app] threw exception [Request processing failed; nested exception is org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'EDITOR_RESOURCEID'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.] with root cause
org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 28; cvc-complex-type.2.4.a: Invalid content was found starting with element 'EDITOR_RESOURCEID'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
   at org.apache.xerces.jaxp.validation.StAXValidatorHelper$StreamHelper.validate(Unknown Source)
   at org.apache.xerces.jaxp.validation.StAXValidatorHelper.validate(Unknown Source)
   at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
   at javax.xml.validation.Validator.validate(Unknown Source)
   at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:220)
   at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:270)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:177)
   at org.activiti.engine.impl.bpmn.deployer.ParsedDeploymentBuilder.createBpmnParseFromResource(ParsedDeploymentBuilder.java:96)
   at org.activiti.engine.impl.bpmn.deployer.ParsedDeploymentBuilder.build(ParsedDeploymentBuilder.java:55)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:69)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:53)
   at org.activiti.engine.impl.cmd.DeployCmd.executeDeploy(DeployCmd.java:110)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:60)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:40)
   at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:38)
   at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:77)
   at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:59)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:43)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:59)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:35)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:34)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:84)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:171)
   at com.activiti.service.runtime.DeploymentServiceImpl.deployAppDefinitionToActiviti(DeploymentServiceImpl.java:237)
   at com.activiti.service.runtime.DeploymentServiceImpl.updateAppDefinition(DeploymentServiceImpl.java:171)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
   at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
   at com.sun.proxy.$Proxy89.updateAppDefinition(Unknown Source)
   at com.activiti.service.editor.AppDefinitionPublishService.publishAppDefinition(AppDefinitionPublishService.java:124)
   at com.activiti.service.editor.AppDefinitionPublishService$$FastClassBySpringCGLIB$$2658cd34.invoke(<generated>)
   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
   at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
   at com.activiti.service.editor.AppDefinitionPublishService$$EnhancerBySpringCGLIB$$9a4908cb.publishAppDefinition(<generated>)
   at com.activiti.rest.editor.AbstractAppDefinitionResource.publishAppDefinition(AbstractAppDefinitionResource.java:248)
   at com.activiti.rest.editor.AppDefinitionResource.publishAppDefinition(AppDefinitionResource.java:106)
   at com.activiti.rest.editor.AppDefinitionResource$$FastClassBySpringCGLIB$$892c67d9.invoke(<generated>)
   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
   at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:48)
   at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:34)
   at com.ryantenney.metrics.spring.AbstractMetricMethodInterceptor.invoke(AbstractMetricMethodInterceptor.java:59)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
   at com.activiti.rest.editor.AppDefinitionResource$$EnhancerBySpringCGLIB$$1f2d09d0.publishAppDefinition(<generated>)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
   at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:149)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Unknown Source)


and my XMLException.java:


package org.activiti.bpmn.exceptions;


public class XMLException extends RuntimeException {

  private static final long serialVersionUID = 1L;

  public XMLException(String message) {
    super(message);
  }

  public XMLException(String message, Throwable t) {
    super(message, t);
  }
}


7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
I'm not really following what you're trying to do here .. what are you doing? How did you add custom stencils? What's the XmlException class for? Example process … etc.

neon
Champ in-the-making
Champ in-the-making
I am trying to add custom stencils (eg : a stencil with embedded forms to start and more complex stencils later) to Activiti 6 and use it. Unfortunatly, I'm still a beginner so I don't really know the exact procedure to do it. The reason why I added XMLException is on the 7th line of my localhost.log, it's written « org.activiti.bpmn.exceptions.XMLException: ». Here is what I did:

stencilset_bpmn.json:
<code>
"propertyPackages" : [ {
|
|
{
"name" : "formuserpropertiespackage",
"properties" : [ {
"id" : "formproperties",
"type" : "Complex",
"title" : "Form properties",
"value" : { "formProperties": [{ "id" : "" , "name" : "" , "type" : "user" ,"expression" : "" , "variable" : "", "required" : false , "readable" : false ,"writable" : false}

                                     ]
                },
"description" : "Definition of the form with a list of form properties",
"popular" : true
} ]
},
] },
"stencils" : [ {
|
|
{
"type" : "node",
"id" : "UserTaskUser",
"title" : "User task (user type)",
"description" : "A manual task assigned to a specific person",
"view" : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg\n xmlns=\"http://www.w3.org/2000/svg\'\n xmlns:svg=\"http://www.w3.org/2000/svg\'\n xmlnsSmiley Surprisedryx=\"http://www.b3mn.org/oryx\'\n xmlns:xlink=\"http://www.w3.org/1999/xlink\'\n\n width=\"102\"\n height=\"82\"\n version=\"1.0\">\n <defs></defs>\n <oryx:magnets>\n \t<oryx:magnet oryx:cx=\"1\" oryx:cy=\"20\" oryx:anchors=\"left\" />\n \t<oryx:magnet oryx:cx=\"1\" oryx:cy=\"40\" oryx:anchors=\"left\" />\n \t<oryx:magnet oryx:cx=\"1\" oryx:cy=\"60\" oryx:anchors=\"left\" />\n \t\n \t<oryx:magnet oryx:cx=\"25\" oryx:cy=\"79\" oryx:anchors=\"bottom\" />\n \t<oryx:magnet oryx:cx=\"50\" oryx:cy=\"79\" oryx:anchors=\"bottom\" />\n \t<oryx:magnet oryx:cx=\"75\" oryx:cy=\"79\" oryx:anchors=\"bottom\" />\n \t\n \t<oryx:magnet oryx:cx=\"99\" oryx:cy=\"20\" oryx:anchors=\"right\" />\n \t<oryx:magnet oryx:cx=\"99\" oryx:cy=\"40\" oryx:anchors=\"right\" />\n \t<oryx:magnet oryx:cx=\"99\" oryx:cy=\"60\" oryx:anchors=\"right\" />\n \t\n \t<oryx:magnet oryx:cx=\"25\" oryx:cy=\"1\" oryx:anchors=\"top\" />\n \t<oryx:magnet oryx:cx=\"50\" oryx:cy=\"1\" oryx:anchors=\"top\" />\n \t<oryx:magnet oryx:cx=\"75\" oryx:cy=\"1\" oryx:anchors=\"top\" />\n \t\n \t<oryx:magnet oryx:cx=\"50\" oryx:cy=\"40\" oryx:default=\"yes\" />\n </oryx:magnets>\n <g pointer-events=\"fill\" oryx:minimumSize=\"50 40\">\n\t<rect id=\"text_frame\" oryx:anchors=\"bottom top right left\" x=\"1\" y=\"1\" width=\"94\" height=\"79\" rx=\"10\" ry=\"10\" stroke=\"none\" stroke-width=\"0\" fill=\"none\" />\n\t<rect id=\"bg_frame\" oryx:resize=\"vertical horizontal\" x=\"0\" y=\"0\" width=\"100\" height=\"80\" rx=\"10\" ry=\"10\" stroke=\"#bbbbbb\" stroke-width=\"1\" fill=\"#f9f9f9\" />\n\t\t<text \n\t\t\tfont-size=\"12\" \n\t\t\tid=\"text_name\" \n\t\t\tx=\"50\" \n\t\t\ty=\"40\" \n\t\t\toryx:align=\"middle center\"\n\t\t\toryx:fittoelem=\"text_frame\"\n\t\t\tstroke=\"#373e48\">\n\t\t</text>\n\t\n\t<g id=\"userTask\" transform=\"translate(3,3)\">\n\t\t<path oryx:anchors=\"top left\"\n \t\tstyle=\"fill:#d1b575;stroke:none;\"\n \t\t d=\"m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111 l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c 0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17\" \n />\n\t\t\n\t</g>\n \n\t<g id=\"parallel\">\n\t\t<path oryx:anchors=\"bottom\" fill=\"none\" stroke=\"#bbbbbb\" d=\"M46 70 v8 M50 70 v8 M54 70 v8\" stroke-width=\"2\" />\n\t</g>\n\t\n\t<g id=\"sequential\">\n\t\t<path oryx:anchors=\"bottom\" fill=\"none\" stroke=\"#bbbbbb\" stroke-width=\"2\" d=\"M46,76h10M46,72h10 M46,68h10\"/>\n\t</g>\n\t\n\n\t<g id=\"compensation\">\n\t\t<path oryx:anchors=\"bottom\" fill=\"none\" stroke=\"#bbbbbb\" d=\"M 62 74 L 66 70 L 66 78 L 62 74 L 62 70 L 58 74 L 62 78 L 62 74\" stroke-width=\"1\" />\n\t</g>\n </g>\n</svg>",
"icon" : "activity/list/type.user.png",
"groups" : [ "Activities" ],
"propertyPackages" : [ "overrideidpackage", "namepackage", "documentationpackage", "asynchronousdefinitionpackage", "exclusivedefinitionpackage", "executionlistenerspackage", "multiinstance_typepackage", "multiinstance_cardinalitypackage", "multiinstance_collectionpackage", "multiinstance_variablepackage", "multiinstance_conditionpackage", "isforcompensationpackage", "usertaskassignmentpackage", "formkeydefinitionpackage", "formreferencepackage", "duedatedefinitionpackage", "prioritydefinitionpackage", "formuserpropertiespackage", "tasklistenerspackage" ],
"hiddenPropertyPackages" : [ ],
"roles" : [ "Activity", "sequence_start", "sequence_end", "ActivitiesMorph", "all" ]
},
}]
</code>

I add this file inside activiti-app/WEB-INF/classes

Then I created a java project on eclipse containing the folder activiti-bpmn-converter, activiti-engine, activiti-json-converter, activiti-rest, activiti-ui and activiti-delegate from the source code project on github.

In activiti-bpmn-converter/src/main/java/org/activiti/bpmn, I created UserTaskUserXMLConverter:
<java>
package org.activiti.bpmn.converter;

import org.activiti.bpmn.converter.UserTaskXMLConverter;
import org.activiti.bpmn.model.BaseElement;


public class UserTaskUserXMLConverter extends UserTaskXMLConverter {

  public Class<? extends BaseElement> getBpmnElementType() {
    return UserTask.class;
  }

  @Override
  protected String getXMLElementName() {
    return ELEMENT_TASK_USER;
  }
}
</java>

In activiti-json-converter/src/main/java/org/activiti/editor/constants/StencilConstants.java:
<java>
package org.activiti.editor.constants;

public interface StencilConstants {

//stencil items
  final String STENCIL_TASK_USER_TASK_USER = "UserTaskUser";
|
|
<java>

In activiti-json-converter/src/main/java/org/activiti/editor/language/json/converter, I created UserTaskUserJsonConverter.java:
<java>
package org.activiti.editor.language.json.converter;


import java.util.Map;

import org.activiti.bpmn.model.BaseElement;
import org.activiti.bpmn.model.UserTask;


public class UserTaskUserJsonConverter extends UserTaskJsonConverter
{
    public static void fillTypes( Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap, Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap )
    {

        fillJsonTypes( convertersToBpmnMap );
        fillBpmnTypes( convertersToJsonMap );
    }


    public static void fillJsonTypes( Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap )
    {
        convertersToBpmnMap.put( STENCIL_TASK_USER_TASK_USER, UserTaskUserJsonConverter.class );
    }


    public static void fillBpmnTypes( Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap )
    {
        convertersToJsonMap.put( UserTask.class, UserTaskUserJsonConverter.class );
    }


    @Override
    protected String getStencilId( BaseElement baseElement )
    {
        return STENCIL_TASK_USER_TASK_USER;
    }

}
</java>

In activiti-json-converter/src/main/java/org/activiti/editor/language/json/converter, BpmnJsonConverter.java:
<java>
|
|
static {
UserTaskUserJsonConverter.fillTypes(convertersToBpmnMap, convertersToJsonMap);
|
|
static {
DI_RECTANGLES.add(STENCIL_TASK_USER_TASK_USER);
|
|
</java>

Then I export my project as project.jar and I put it inside activiti-app/WEB-INF/lib

If you need more informations, don’t hesitate to ask me ^^

jbarrez
Star Contributor
Star Contributor
So your code is failing on

    Validator validator = schema.newValidator();


Which means that it's not valid XML, conforming the BPMN 2.0 xsd schema.
When you add custom stuff, you need to add it under <extensionElements>, or else the schema won't be valdiating.

So from what I'm seeing, I'm guessing your UserTaskUserXMLConverter is spitting out wrong XML.

neon
Champ in-the-making
Champ in-the-making
Sorry but I don't really understand where and what do I have to add stuffs. I saw in activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/BpmnXMLConverter.java there are calls to the  XML converter so I add:
<java>
static {
  addConverter (new UserTaskUserXMLConverter());
|
|
</java>
but it still doesn't work.
Do I have to add something in activiti-bpmn-converter/src/main/java/org/activiti/bpmn/constants/BpmnXMLConstants.java?

jbarrez
Star Contributor
Star Contributor
> Sorry but I don't really understand where and what do I have to add stuffs.

What you're doing is quite an advanced thing and goes beyond what typical Activiti users do.

What do you want to do in the custom stencil? Why do you need custom XML?
You can only add stuff to the extensionElements in the XML, nothing more.

The error is clear:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'EDITOR_RESOURCEID'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.

The xml is wrong. Can you paste the XML that's being procuded (probably need to debug to get that xml variable).

neon
Champ in-the-making
Champ in-the-making
For now I would like to create simple custom stencils for exemple a User Task with an included form  and another title but later, I will need to create custom stencils with java classes, web services and databases connections. I also need my stencils to be easyly transportable. I contacted a guy who was able to create this kind of stencils on activiti 5.17, unfortunatly he lost his files and doesn't remember how he did it.

Here is my xml with start, usertaskuser and end (I didn't saved the last one so I created another one and I have the same mistake):
<code>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
  <process id="t" name="t" isExecutable="true">
    <startEvent id="startEvent1" activiti:isInterrupting="false"></startEvent>
    <sequenceFlow id="sid-2A2677AB-4490-4F7E-9388-3640D994AF43" sourceRef="startEvent1" targetRef="test"></sequenceFlow>
    <endEvent id="sid-B2722E4B-1FEE-46CD-A88E-A9C1C8CB8FF6"></endEvent>
    <sequenceFlow id="sid-B3D73240-61D4-49BB-88AD-0CB218FA75E5" sourceRef="test" targetRef="sid-B2722E4B-1FEE-46CD-A88E-A9C1C8CB8FF6">
      <extensionElements>
        <EDITOR_RESOURCEID>sid-B3D73240-61D4-49BB-88AD-0CB218FA75E5</EDITOR_RESOURCEID>
      </extensionElements>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_t">
    <bpmndi:BPMNPlane bpmnElement="t" id="BPMNPlane_t">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-B2722E4B-1FEE-46CD-A88E-A9C1C8CB8FF6" id="BPMNShape_sid-B2722E4B-1FEE-46CD-A88E-A9C1C8CB8FF6">
        <omgdc:Bounds height="28.0" width="28.0" x="403.6666564941406" y="154.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-B3D73240-61D4-49BB-88AD-0CB218FA75E5" id="BPMNEdge_sid-B3D73240-61D4-49BB-88AD-0CB218FA75E5">
        <omgdi:waypoint x="403.6666564941406" y="168.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-2A2677AB-4490-4F7E-9388-3640D994AF43" id="BPMNEdge_sid-2A2677AB-4490-4F7E-9388-3640D994AF43">
        <omgdi:waypoint x="129.96223959811854" y="176.93633360093818"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
</code>

and the log :
<code>
juil. 29, 2016 9:35:13 AM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring FrameworkServlet 'appDispatcher'
juil. 29, 2016 9:35:27 AM org.apache.catalina.core.ApplicationContext log
INFOS: No Spring WebApplicationInitializer types detected on classpath
juil. 29, 2016 9:35:34 AM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring FrameworkServlet 'dispatcher'
juil. 29, 2016 9:35:47 AM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring FrameworkServlet 'dispatcher'
juil. 29, 2016 9:48:31 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [appDispatcher] in context with path [/activiti-app] threw exception [Request processing failed; nested exception is org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'EDITOR_RESOURCEID'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.] with root cause
org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 28; cvc-complex-type.2.4.a: Invalid content was found starting with element 'EDITOR_RESOURCEID'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.jaxp.validation.StAXValidatorHelper$StreamHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.StAXValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:220)
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:270)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:177)
at org.activiti.engine.impl.bpmn.deployer.ParsedDeploymentBuilder.createBpmnParseFromResource(ParsedDeploymentBuilder.java:96)
at org.activiti.engine.impl.bpmn.deployer.ParsedDeploymentBuilder.build(ParsedDeploymentBuilder.java:55)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:69)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:53)
at org.activiti.engine.impl.cmd.DeployCmd.executeDeploy(DeployCmd.java:110)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:60)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:40)
at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:38)
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:77)
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:59)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:43)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:59)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:35)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:34)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:84)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:171)
at com.activiti.service.runtime.DeploymentServiceImpl.deployAppDefinitionToActiviti(DeploymentServiceImpl.java:237)
at com.activiti.service.runtime.DeploymentServiceImpl.updateAppDefinition(DeploymentServiceImpl.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy89.updateAppDefinition(Unknown Source)
at com.activiti.service.editor.AppDefinitionPublishService.publishAppDefinition(AppDefinitionPublishService.java:124)
at com.activiti.service.editor.AppDefinitionPublishService$$FastClassBySpringCGLIB$$2658cd34.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.activiti.service.editor.AppDefinitionPublishService$$EnhancerBySpringCGLIB$$b32776ca.publishAppDefinition(<generated>)
at com.activiti.rest.editor.AbstractAppDefinitionResource.publishAppDefinition(AbstractAppDefinitionResource.java:248)
at com.activiti.rest.editor.AppDefinitionResource.publishAppDefinition(AppDefinitionResource.java:106)
at com.activiti.rest.editor.AppDefinitionResource$$FastClassBySpringCGLIB$$892c67d9.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:48)
at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:34)
at com.ryantenney.metrics.spring.AbstractMetricMethodInterceptor.invoke(AbstractMetricMethodInterceptor.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.activiti.rest.editor.AppDefinitionResource$$EnhancerBySpringCGLIB$$7b0a9e2b.publishAppDefinition(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

</code>

marksierikov
Champ in-the-making
Champ in-the-making
I have the same problem. I use tag <extensionElemetnts> and put inside my custom extension, when i import workflow via activiti-explorer it works fine, but when i deploy it, it throw org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'prime'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected..
Example of workflow:

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:activiti="http://activiti.org/bpmn"
             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
             xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"
             xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
             xmlns:customNamespace="http://www.w3.org/2001/XMLSchema-instance"
             customNamespace:schemaLocation="http://www.w3.org/2001/XMLSchema-instance file:///path_to_schema.xml"
             typeLanguage="http://www.w3.org/2001/XMLSchema"
             expressionLanguage="http://www.w3.org/1999/XPath"
             targetNamespace="http://www.activiti.org/test">
<process id="process_id" name="process_name">
    <startEvent id="sid-XXXX"></startEvent>
    <sequenceFlow id="sid-YYYY" sourceRef="sid-XXXX" targetRef="ZZZZ">
            <extensionElements>
                <customNamespaceSmiley Tonguerime>true</customNamespaceSmiley Tonguerime>
            </extensionElements>
        </sequenceFlow>
    <endEvent id="sid-ZZZZ"></endEvent>
</process>

but when i deploy it, i get parsing error:
org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'prime'. One of '{WC[##other:"http://www.omg.org/spec/BPMN/20100524/MODEL"]}' is expected.

I downloaded workflow by import model via activiti explorer. And i has other structure than my origin workflow. It looks like:

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:activiti="http://activiti.org/bpmn"
             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
             xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"
             xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
             xmlns:customNamespace="http://www.w3.org/2001/XMLSchema-instance"
             customNamespace:schemaLocation="http://www.w3.org/2001/XMLSchema-instance file:///path_to_schema.xml"
             typeLanguage="http://www.w3.org/2001/XMLSchema"
             expressionLanguage="http://www.w3.org/1999/XPath"
             targetNamespace="http://www.activiti.org/test">
<process id="process_id" name="process_name">
    <startEvent id="sid-XXXX"></startEvent>
    <sequenceFlow id="sid-YYYY" sourceRef="sid-XXXX" targetRef="ZZZZ">
            <extensionElements>
                <prime>true</prime>
            </extensionElements>
        </sequenceFlow>
    <endEvent id="sid-ZZZZ"></endEvent>
</process>