# Adhoc task fails to deploy

**URL:** <https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873>\
**Category:** Flowable Engine\
**Created:** [August 20, 2017, 9:50am UTC](https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873 "2017-08-20T09:50:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zwets](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/zwets/32/294_2.png) [@zwets](https://forum.flowable.org/u/zwets)\
**Post date:** [August 20, 2017, 9:50am UTC](https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873/1 "2017-08-20T09:50:10Z")

</div>

Following Tijs’s blog post [“Flowable 6 adds ad-hoc sub process support”](http://bpmn20inaction.blogspot.com/2016/02/activiti-6-adds-ad-hoc-sub-process.html), I modelled the same process in Flowable Modeler (6.2.0-SNAPSHOT). However, when I try to publish the process, app deployment fails with this root exception:

```
Caused by: org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 137; cvc-complex-type.2.4.d: Invalid content was found starting with element 'userTask'. No child element is expected at this point.
    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(Validator.java:124)
    at org.flowable.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:222)
    at org.flowable.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:266)
    ... 95 more

```

The process does validate correctly when I press the Validate button the modeller. Am I overlooking something?

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [August 22, 2017, 11:03am UTC](https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873/2 "2017-08-22T11:03:01Z")

</div>

I’ve tried it here with with the current master too, but I can deploy it without problems when I try to deploy it from a unit test or when I publish an app with the process model. Can you post your bpmn20.xml?

---

<div class="post-metadata">

**Author:** ![zwets](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/zwets/32/294_2.png) [@zwets](https://forum.flowable.org/u/zwets)\
**Post date:** [August 27, 2017, 8:24pm UTC](https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873/3 "2017-08-27T20:24:28Z")

</div>

I couldn’t locate the original model so rebuilt it and this time it published without a hitch. Inverse Murphy’s law. What is odd is that in the Admin App, if I click “Show process diagram”, it displays only the Start Event.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [August 29, 2017, 12:30pm UTC](https://forum.flowable.org/t/adhoc-task-fails-to-deploy/873/4 "2017-08-29T12:30:46Z")

</div>

> [@zwets](#):
>
> Inverse Murphy’s law.

lol. But good that you haven’t been able to reproduce 😉

> [@zwets](#):
>
> it displays only the Start Event.

Could be the js renderer hasn’t got support for the adhoc subprocess yet …
