Camunda Custom Form Field Type

We are implementing Camunda on our application and we have a problem with forms

We need to implement our own form field type. We use the Camunda Modeler and use the custom type in the Type attribute of the field but when we try to deploy the war we always see the same error

ENGINE-16004 Exception while closing command context: ENGINE-09005 Could not parse BPMN process. Errors:
* unknown type 'file' [...]

We searched in the documentation but we don’t see how to implement custom form field types

Any idea how to solve this?

Thanks in advance

Hi @rubenjgarcia,

Could you please share the complete stacktrace? Could you also share you bpmn file?

Thanks.

Cheers,
Roman

Here’s the XML

<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:collaboration id="Collaboration_08hsp6h">
    <bpmn2:participant id="Participant_1pw2jjs" processRef="Solicitud_AJ_FC" />
  </bpmn2:collaboration>
  <bpmn2:process id="Solicitud_AJ_FC" name="Solicitud de una Consulta Jurídica (Firma Contratos)" isExecutable="true">
    <bpmn2:documentation>Solicitud de Consulta Jurídica para el caso de la firma de CONTRATOS</bpmn2:documentation>
    <bpmn2:laneSet>
      <bpmn2:lane id="Lane_1g7ftku" name="AreasConsulta_AJ">
        <bpmn2:flowNodeRef>StartEvent_1</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>UserTask_0tmlk2w</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ScriptTask_0s1svsw</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>UserTask_15dac1v</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>EndEvent_1v0fjs0</bpmn2:flowNodeRef>
      </bpmn2:lane>
      <bpmn2:lane id="Lane_0ka57d8" name="AsesoriaJuridica">
        <bpmn2:documentation>Departamento de Asesoría Jurídica que se encarga de tramitar las Solicitudes de Consultas Jurídicas para la firma de Contratos</bpmn2:documentation>
        <bpmn2:flowNodeRef>UserTask_0aqonf7</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ExclusiveGateway_169impe</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_0un9inp</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>UserTask_12llydu</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_1e1y2h1</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>EndEvent_1fqpmg0</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>BusinessRuleTask_0nnuzzm</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ScriptTask_1nm9wao</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>UserTask_0wawza6</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_1rebz2z</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_0xdhami</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ExclusiveGateway_1k3j0b0</bpmn2:flowNodeRef>
      </bpmn2:lane>
      <bpmn2:lane id="Lane_1n3sbjo" name="Secretario General">
        <bpmn2:flowNodeRef>UserTask_0or79cm</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_10648y7</bpmn2:flowNodeRef>
        <bpmn2:flowNodeRef>ServiceTask_0vcb1kv</bpmn2:flowNodeRef>
      </bpmn2:lane>
    </bpmn2:laneSet>
    <bpmn2:sequenceFlow id="SequenceFlow_0ska9ps" sourceRef="StartEvent_1" targetRef="UserTask_0tmlk2w" />
    <bpmn2:sequenceFlow id="SequenceFlow_14qar4m" sourceRef="UserTask_0tmlk2w" targetRef="UserTask_0aqonf7" />
    <bpmn2:sequenceFlow id="SequenceFlow_1dugqu9" sourceRef="UserTask_0aqonf7" targetRef="ExclusiveGateway_169impe" />
    <bpmn2:sequenceFlow id="SequenceFlow_0bx563g" name="No" sourceRef="ExclusiveGateway_169impe" targetRef="ServiceTask_0un9inp">
      <bpmn2:documentation>Si el tipo de solicitud NO es Consulta Firma Contrato</bpmn2:documentation>
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">!isFirmaContrato</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:userTask id="UserTask_0aqonf7" name="Catalogar Solicitud" camunda:candidateGroups="AsesoriaJuridica">
      <bpmn2:documentation>El departamento de Asesoría Jurídica cataloga la solicitud después de comprobar que es del tipo Firma de Contrato leyendo la descripción que figura en la misma.</bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:formData>
          <camunda:formField id="isFirmaContrato" label="Es una solicitud de Tipo Contrato:" type="boolean" defaultValue="True" />
        </camunda:formData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_14qar4m</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1dugqu9</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:exclusiveGateway id="ExclusiveGateway_169impe" name="La Solicitud es Consulta Firma Contrato">
      <bpmn2:documentation>Evaluamos el tipo de solicitud según la respuesta ¿La Solicitud recibida es de tipo Consulta Firma Contrato?</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_1dugqu9</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0bx563g</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_0cw56kq</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:serviceTask id="ServiceTask_0un9inp" name="Archivar Solicitud" camunda:class="es.virtualdesk.UFV.task.ArchivarSolicitud">
      <bpmn2:documentation><![CDATA[Se archiva la solicitud con: Estado=Archivada Definitiva
Motivo=Tipo Solicitud incorrecto]]></bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="EstadoProceso">Archivada definitiva</camunda:outputParameter>
          <camunda:outputParameter name="Motivo" />
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0bx563g</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1sdt8sj</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:sequenceFlow id="SequenceFlow_0cw56kq" name="Si" sourceRef="ExclusiveGateway_169impe" targetRef="UserTask_12llydu">
      <bpmn2:documentation>Si el tipo de solicitud SI es Consulta Firma Contrato</bpmn2:documentation>
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">isFirmaContrato</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:userTask id="UserTask_12llydu" name="Asignar propiedades" camunda:candidateGroups="AsesoriaJuridica">
      <bpmn2:documentation>Asignar la prioridad de la solicitud (Alta, Media, Baja) y la persona del departamento de AJ que debe realizarla</bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:formData>
          <camunda:formField id="Prioridad" type="enum">
            <camunda:value id="PrioridadAlta" name="Alta" />
            <camunda:value id="PrioridadMedia" name="Media" />
            <camunda:value id="PrioridadBaja" name="Baja" />
          </camunda:formField>
          <camunda:formField id="ResponsableSolicitudFC" label="Elegir responsable:" type="enum" />
        </camunda:formData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0cw56kq</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0p4sxao</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:sequenceFlow id="SequenceFlow_1sdt8sj" sourceRef="ServiceTask_0un9inp" targetRef="EndEvent_1fqpmg0" />
    <bpmn2:sequenceFlow id="SequenceFlow_0p4sxao" sourceRef="UserTask_12llydu" targetRef="ServiceTask_1e1y2h1" />
    <bpmn2:serviceTask id="ServiceTask_1e1y2h1" name="Codificar Solicitud" camunda:class="es.virtualdesk.UFV.task.CodificarSolicitudCFC">
      <bpmn2:documentation><![CDATA[Se le asigna el código secuencial de Solicitud de Contrato CTTnnnn/YYYY
Estado = En proceso]]></bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_0p4sxao</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0id5jca</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:sequenceFlow id="SequenceFlow_0id5jca" sourceRef="ServiceTask_1e1y2h1" targetRef="BusinessRuleTask_0nnuzzm" />
    <bpmn2:endEvent id="EndEvent_1fqpmg0">
      <bpmn2:incoming>SequenceFlow_1sdt8sj</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:businessRuleTask id="BusinessRuleTask_0nnuzzm" name="Obtener límite días archivado" camunda:decisionRef="diasArchivado">
      <bpmn2:incoming>SequenceFlow_0id5jca</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_083eabj</bpmn2:outgoing>
    </bpmn2:businessRuleTask>
    <bpmn2:sequenceFlow id="SequenceFlow_083eabj" sourceRef="BusinessRuleTask_0nnuzzm" targetRef="ScriptTask_1nm9wao" />
    <bpmn2:scriptTask id="ScriptTask_1nm9wao" name="Actualizar estado y fecha fin proceso">
      <bpmn2:documentation>Actualiza el estado a En proceso y la fecha fin en función de la prioridad establecida</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_083eabj</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1bwji0t</bpmn2:outgoing>
      <bpmn2:script>PT5?</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_1bwji0t" sourceRef="ScriptTask_1nm9wao" targetRef="UserTask_0wawza6" />
    <bpmn2:userTask id="UserTask_0wawza6" name="Edición y aprobación de documento" camunda:candidateGroups="AsesoriaJuridica">
      <bpmn2:documentation>Se van añadiendo modificaciones al documento inicial anexado, hasta que la persona que lo tiene asignado da el visto bueno al contrato</bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:formData>
          <camunda:formField id="isAproved" label="Contrato Aprobado:" type="boolean" />
        </camunda:formData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_1bwji0t</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_087kzfw</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0xq5w35</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:serviceTask id="ServiceTask_1rebz2z" name="Avisar al solicitante" camunda:class="es.virtualdesk.UFV.task.AlertaSolicitante">
      <bpmn2:documentation>Se le hace llegar al solicitante un aviso mediante la gestión de Alertas</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_01hs2al</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1w5lz3k</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:sequenceFlow id="SequenceFlow_1w5lz3k" sourceRef="ServiceTask_1rebz2z" targetRef="ServiceTask_0xdhami" />
    <bpmn2:serviceTask id="ServiceTask_0xdhami" name="Avisar al Sercretario General" camunda:class="es.virtualdesk.UFV.task.AlertaSecGeneral">
      <bpmn2:documentation>Se le hace llegar al Secretario General un aviso mediante la gestión de Alertas</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_1w5lz3k</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1w2brh6</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:sequenceFlow id="SequenceFlow_1w2brh6" sourceRef="ServiceTask_0xdhami" targetRef="UserTask_0or79cm" />
    <bpmn2:sequenceFlow id="SequenceFlow_00vrp7e" sourceRef="UserTask_0or79cm" targetRef="ServiceTask_10648y7" />
    <bpmn2:sequenceFlow id="SequenceFlow_0byy588" sourceRef="ServiceTask_10648y7" targetRef="ServiceTask_0vcb1kv" />
    <bpmn2:sequenceFlow id="SequenceFlow_0vqxspy" sourceRef="ServiceTask_0vcb1kv" targetRef="UserTask_15dac1v" />
    <bpmn2:sequenceFlow id="SequenceFlow_15bqjkv" sourceRef="UserTask_15dac1v" targetRef="ScriptTask_0s1svsw" />
    <bpmn2:startEvent id="StartEvent_1">
      <bpmn2:outgoing>SequenceFlow_0ska9ps</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:userTask id="UserTask_0tmlk2w" name="Envar solicitud" camunda:candidateGroups="all">
      <bpmn2:documentation>Rellenado de la Solicitud por cualquier perfil o actor de la UFV  y enviarla con los anexos que estime conveniente.</bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:formData>
          <camunda:formField id="pdfSolicitud" label="Rellene la solicitud" type="file" />
          <camunda:formField id="DocumentosAnexos" label="Documentos a adjuntar:" type="file" />
        </camunda:formData>
        <camunda:inputOutput>
          <camunda:outputParameter name="EstadoProceso">Recibido</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0ska9ps</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_14qar4m</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:scriptTask id="ScriptTask_0s1svsw" name="Envío contrato a Archivo" scriptFormat="groovy">
      <bpmn2:documentation>Enviar el contrato a archivo para su custodia durante el tiempo que marque la normativa de la Universidad, y pasar la solicitud a estado “archivada”</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_15bqjkv</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_08t6py3</bpmn2:outgoing>
      <bpmn2:script><![CDATA[println "Envio contrato a Archivo"]]></bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:userTask id="UserTask_15dac1v" name="Subir contrato firmado por el contrario" camunda:candidateGroups="Usuario Solicitud">
      <bpmn2:documentation>El usuario de la solicitud, será el responsables de que la parte contraria firme el contrato y una vez firmado, se encargue de subirlo a la plataforma para que el proceso siga.</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_0vqxspy</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_15bqjkv</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:endEvent id="EndEvent_1v0fjs0" name="Fin">
      <bpmn2:incoming>SequenceFlow_08t6py3</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_08t6py3" sourceRef="ScriptTask_0s1svsw" targetRef="EndEvent_1v0fjs0" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_1k3j0b0" name="Documento Aprobado">
      <bpmn2:documentation>Comprobar aprobación de documento</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_0xq5w35</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_087kzfw</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_01hs2al</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_0xq5w35" sourceRef="UserTask_0wawza6" targetRef="ExclusiveGateway_1k3j0b0" />
    <bpmn2:sequenceFlow id="SequenceFlow_087kzfw" name="No aprobado" sourceRef="ExclusiveGateway_1k3j0b0" targetRef="UserTask_0wawza6">
      <bpmn2:documentation>Ver si el documento se ha aprobado</bpmn2:documentation>
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">!isAproved</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_01hs2al" name="Si aprobado" sourceRef="ExclusiveGateway_1k3j0b0" targetRef="ServiceTask_1rebz2z">
      <bpmn2:documentation>Si el documento se ha aprobado</bpmn2:documentation>
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">isAproved</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:userTask id="UserTask_0or79cm" name="Firma Secretario General" camunda:candidateGroups="SecretarioGeneral">
      <bpmn2:documentation>El S. General puede editar el documento y/o firmarlo</bpmn2:documentation>
      <bpmn2:extensionElements>
        <camunda:formData>
          <camunda:formField id="FirmaSG" label="Firmado:" type="boolean" />
        </camunda:formData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_1w2brh6</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_00vrp7e</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:serviceTask id="ServiceTask_10648y7" name="Avisar a Asesoría Jurídica" camunda:class="es.virtualdesk.UFV.task.AlertaAJuridica">
      <bpmn2:documentation>Se le hace llegar a Asesoría Jurídica un aviso mediante la gestión de Alertas para que proceda a su Archivado</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_00vrp7e</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0byy588</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="ServiceTask_0vcb1kv" name="Avisar al solicitante" camunda:class="es.virtualdesk.UFV.task.AlertaSolicitante">
      <bpmn2:documentation>Se le hace llegar al solicitante un aviso mediante la gestión de Alertas para informarle de que el Contrato ha sido firmado por el S. General.</bpmn2:documentation>
      <bpmn2:incoming>SequenceFlow_0byy588</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0vqxspy</bpmn2:outgoing>
    </bpmn2:serviceTask>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_08hsp6h">
      <bpmndi:BPMNShape id="Participant_1pw2jjs_di" bpmnElement="Participant_1pw2jjs">
        <dc:Bounds x="362" y="198" width="789" height="1242" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="520" y="245" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="493" y="281" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="UserTask_0tmlk2w_di" bpmnElement="UserTask_0tmlk2w">
        <dc:Bounds x="488" y="325" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0ska9ps_di" bpmnElement="SequenceFlow_0ska9ps">
        <di:waypoint xsi:type="dc:Point" x="538" y="281" />
        <di:waypoint xsi:type="dc:Point" x="538" y="325" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="436" y="248" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Lane_1g7ftku_di" bpmnElement="Lane_1g7ftku">
        <dc:Bounds x="392" y="198" width="759.3340000000001" height="250" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_0ka57d8_di" bpmnElement="Lane_0ka57d8">
        <dc:Bounds x="392" y="448" width="759.3340000000001" height="717" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_14qar4m_di" bpmnElement="SequenceFlow_14qar4m">
        <di:waypoint xsi:type="dc:Point" x="538" y="405" />
        <di:waypoint xsi:type="dc:Point" x="538" y="481" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="493" y="374" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="UserTask_0aqonf7_di" bpmnElement="UserTask_0aqonf7">
        <dc:Bounds x="488" y="481" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_169impe_di" bpmnElement="ExclusiveGateway_169impe" isMarkerVisible="true">
        <dc:Bounds x="634" y="496" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="614" y="454" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1dugqu9_di" bpmnElement="SequenceFlow_1dugqu9">
        <di:waypoint xsi:type="dc:Point" x="588" y="521" />
        <di:waypoint xsi:type="dc:Point" x="611" y="521" />
        <di:waypoint xsi:type="dc:Point" x="611" y="521" />
        <di:waypoint xsi:type="dc:Point" x="634" y="521" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="566.5" y="500" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0bx563g_di" bpmnElement="SequenceFlow_0bx563g">
        <di:waypoint xsi:type="dc:Point" x="684" y="521" />
        <di:waypoint xsi:type="dc:Point" x="738" y="521" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="658" y="497" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_0un9inp_di" bpmnElement="ServiceTask_0un9inp">
        <dc:Bounds x="738" y="481" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0cw56kq_di" bpmnElement="SequenceFlow_0cw56kq">
        <di:waypoint xsi:type="dc:Point" x="659" y="546" />
        <di:waypoint xsi:type="dc:Point" x="659" y="594" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="639" y="558" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="UserTask_12llydu_di" bpmnElement="UserTask_12llydu">
        <dc:Bounds x="609" y="594.3830207305034" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1fqpmg0_di" bpmnElement="EndEvent_1fqpmg0">
        <dc:Bounds x="770" y="601" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="743" y="637" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1sdt8sj_di" bpmnElement="SequenceFlow_1sdt8sj">
        <di:waypoint xsi:type="dc:Point" x="788" y="561" />
        <di:waypoint xsi:type="dc:Point" x="788" y="601" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="743" y="671" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0p4sxao_di" bpmnElement="SequenceFlow_0p4sxao">
        <di:waypoint xsi:type="dc:Point" x="659" y="674" />
        <di:waypoint xsi:type="dc:Point" x="659" y="708" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="614" y="681" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_1e1y2h1_di" bpmnElement="ServiceTask_1e1y2h1">
        <dc:Bounds x="609" y="708.3830207305034" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="UserTask_0wawza6_di" bpmnElement="UserTask_0wawza6">
        <dc:Bounds x="609" y="849" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1n3sbjo_di" bpmnElement="Lane_1n3sbjo">
        <dc:Bounds x="392" y="1165" width="759.3340000000001" height="274.9230009871669" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="UserTask_0or79cm_di" bpmnElement="UserTask_0or79cm">
        <dc:Bounds x="609" y="1243" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0id5jca_di" bpmnElement="SequenceFlow_0id5jca">
        <di:waypoint xsi:type="dc:Point" x="709" y="748" />
        <di:waypoint xsi:type="dc:Point" x="738" y="748" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="646.5" y="738" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BusinessRuleTask_0nnuzzm_di" bpmnElement="BusinessRuleTask_0nnuzzm">
        <dc:Bounds x="738.3340000000001" y="708" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_083eabj_di" bpmnElement="SequenceFlow_083eabj">
        <di:waypoint xsi:type="dc:Point" x="838" y="748" />
        <di:waypoint xsi:type="dc:Point" x="864" y="748" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="806" y="738" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_1nm9wao_di" bpmnElement="ScriptTask_1nm9wao">
        <dc:Bounds x="864.3340000000001" y="708" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1bwji0t_di" bpmnElement="SequenceFlow_1bwji0t">
        <di:waypoint xsi:type="dc:Point" x="914" y="788" />
        <di:waypoint xsi:type="dc:Point" x="914" y="816" />
        <di:waypoint xsi:type="dc:Point" x="659" y="816" />
        <di:waypoint xsi:type="dc:Point" x="659" y="849" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="742" y="791.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_1rebz2z_di" bpmnElement="ServiceTask_1rebz2z">
        <dc:Bounds x="738" y="849" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1w5lz3k_di" bpmnElement="SequenceFlow_1w5lz3k">
        <di:waypoint xsi:type="dc:Point" x="838" y="889" />
        <di:waypoint xsi:type="dc:Point" x="864" y="889" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="806" y="879" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_0xdhami_di" bpmnElement="ServiceTask_0xdhami">
        <dc:Bounds x="864" y="849" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1w2brh6_di" bpmnElement="SequenceFlow_1w2brh6">
        <di:waypoint xsi:type="dc:Point" x="914" y="929" />
        <di:waypoint xsi:type="dc:Point" x="914" y="1111" />
        <di:waypoint xsi:type="dc:Point" x="659" y="1111" />
        <di:waypoint xsi:type="dc:Point" x="659" y="1243" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="742" y="1046.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_00vrp7e_di" bpmnElement="SequenceFlow_00vrp7e">
        <di:waypoint xsi:type="dc:Point" x="709" y="1283" />
        <di:waypoint xsi:type="dc:Point" x="738" y="1283" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="678.5" y="1214" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_10648y7_di" bpmnElement="ServiceTask_10648y7">
        <dc:Bounds x="738" y="1243" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0byy588_di" bpmnElement="SequenceFlow_0byy588">
        <di:waypoint xsi:type="dc:Point" x="838" y="1283" />
        <di:waypoint xsi:type="dc:Point" x="872" y="1283" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="743" y="1116.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_0vcb1kv_di" bpmnElement="ServiceTask_0vcb1kv">
        <dc:Bounds x="872" y="1243" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0vqxspy_di" bpmnElement="SequenceFlow_0vqxspy">
        <di:waypoint xsi:type="dc:Point" x="972" y="1283" />
        <di:waypoint xsi:type="dc:Point" x="1008" y="1283" />
        <di:waypoint xsi:type="dc:Point" x="1008" y="405" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="912.5" y="925" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="UserTask_15dac1v_di" bpmnElement="UserTask_15dac1v">
        <dc:Bounds x="958" y="325" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_15bqjkv_di" bpmnElement="SequenceFlow_15bqjkv">
        <di:waypoint xsi:type="dc:Point" x="958" y="365" />
        <di:waypoint xsi:type="dc:Point" x="938" y="365" />
        <di:waypoint xsi:type="dc:Point" x="938" y="365" />
        <di:waypoint xsi:type="dc:Point" x="917" y="365" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="892.5" y="376" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_0s1svsw_di" bpmnElement="ScriptTask_0s1svsw">
        <dc:Bounds x="816.568608094768" y="325" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1v0fjs0_di" bpmnElement="EndEvent_1v0fjs0">
        <dc:Bounds x="720.030602171767" y="347" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="693.030602171767" y="383" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_08t6py3_di" bpmnElement="SequenceFlow_08t6py3">
        <di:waypoint xsi:type="dc:Point" x="817" y="365" />
        <di:waypoint xsi:type="dc:Point" x="756" y="365" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="741.5" y="355" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_1k3j0b0_di" bpmnElement="ExclusiveGateway_1k3j0b0" isMarkerVisible="true">
        <dc:Bounds x="634" y="960.8282329713722" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="614" y="1010.8282329713722" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0xq5w35_di" bpmnElement="SequenceFlow_0xq5w35">
        <di:waypoint xsi:type="dc:Point" x="659" y="929" />
        <di:waypoint xsi:type="dc:Point" x="659" y="961" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="614" y="935" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_087kzfw_di" bpmnElement="SequenceFlow_087kzfw">
        <di:waypoint xsi:type="dc:Point" x="634" y="986" />
        <di:waypoint xsi:type="dc:Point" x="546" y="986" />
        <di:waypoint xsi:type="dc:Point" x="546" y="889" />
        <di:waypoint xsi:type="dc:Point" x="609" y="889" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="466" y="929" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_01hs2al_di" bpmnElement="SequenceFlow_01hs2al">
        <di:waypoint xsi:type="dc:Point" x="684" y="986" />
        <di:waypoint xsi:type="dc:Point" x="788" y="986" />
        <di:waypoint xsi:type="dc:Point" x="788" y="929" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="710" y="953" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>

And here’s the stacktrace

09:07:39,948 ERROR [org.camunda.bpm.engine.context] (ServerService Thread Pool -- 50) ENGINE-16004 Exception while closing command context: ENGINE-09005 Could not parse BPMN process. Errors:
* unknown type 'file' | Consulta Asesoria Juridica Firma Contrato v1.0.bpmn | line 149 | column 91
* unknown type 'file' | Consulta Asesoria Juridica Firma Contrato v1.0.bpmn | line 150 | column 97: org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors:
* unknown type 'file' | Consulta Asesoria Juridica Firma Contrato v1.0.bpmn | line 149 | column 91
* unknown type 'file' | Consulta Asesoria Juridica Firma Contrato v1.0.bpmn | line 150 | column 97
	at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(EngineUtilLogger.java:58) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.util.xml.Parse.throwExceptionForErrors(Parse.java:191) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:305) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.transformDefinitions(BpmnDeployer.java:100) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.transformResource(AbstractDefinitionDeployer.java:91) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.parseDefinitionResources(AbstractDefinitionDeployer.java:66) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.deploy(AbstractDefinitionDeployer.java:56) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache$1.call(DeploymentCache.java:69) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache$1.call(DeploymentCache.java:66) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:553) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:66) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:52) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.deploy(DeployCmd.java:470) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:137) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:126) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:553) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:126) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:93) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:75) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:92) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:207) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:59) [camunda-engine-7.4.0.jar:7.4.0]
	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:168)
	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:165)
	at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:53)
	at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:45)
	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService.performDeployment(ProcessApplicationDeploymentService.java:165)
	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$1.run(ProcessApplicationDeploymentService.java:88)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_66]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)

could you try: File or Bytes instead?

Same error with File and with Bytes :sweat:

Hi @rubenjgarcia,

Thanks for providing the stacktrace and your bpmn xml.

Since the form field type file is not supported out of the box, you have to provide an implementation of your custom form field type by yourself and add it to the process engine configuration as custom type.

Therefore you have to extend the class AbstractFormFieldType for example like this:

public FileFormFieldType extends AbstractFormFieldType {

  ...

}

In the process engine configuration you have to add an instance of this to the property flag customFormTypes.

How do you configure your process engine?

Cheers,
Roman

We have the process engine with the default values. We use JBoss 7 and we’ve follow the instructions to install camunda on it

Thanks to your comments we can use our custom form field type

We defined a new Process Engine Plugin

public class FormFileProcessEnginePlugin extends AbstractProcessEnginePlugin {
    
    @Override
    public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
            if (processEngineConfiguration.getCustomFormTypes() == null) {
                    processEngineConfiguration.setCustomFormTypes(new ArrayList<AbstractFormFieldType>());
            }
            
            List<AbstractFormFieldType> formTypes = processEngineConfiguration.getCustomFormTypes();
            formTypes.add(new FileFormFieldType());
    }
}

Then we add the jar containing the class as a JBoss module and then add the plugin to the standalone.xml file

<process-engine name="default" default="true">
    ...
    <plugins>
        <plugin>
            <class>es.virtualdesk.core.camunda.component.plugins.form.FormFileProcessEnginePlugin</class>
        </plugin>
    </plugins>
</process-engine>
5 Likes

Hi @rubenjgarcia,
i am trying to implement the same thing but i really don’t know where to start.

can you help me please?