Hi
I deployed a bpmn file along with a form using REST api.
Here is my code.
File file = new File("C:\\Users\\prasad\\Desktop\\camunda-get-started-Step-4\\src\\main\\resources\\loan-approval.bpmn");
FileSystemResource bpmnFileResource = new FileSystemResource(file);
File formFile = new File("C:\\Users\\prasad\\Desktop\\camunda-get-started-Step-4\\src\\main\\webapp\\forms\\approve-loan.html");
FileSystemResource formFileResource1 = new FileSystemResource(formFile);
File formFile2 = new File("C:\\Users\\prasad\\Desktop\\camunda-get-started-Step-4\\src\\main\\webapp\\forms\\request-loan.html");
FileSystemResource formFileResource2 = new FileSystemResource(formFile2);
MultiValueMap<String, Object> parts = new LinkedMultiValueMap<String, Object>();
parts.add("deployment-name", "loan-approval-form");
parts.add("enable-duplicate-filtering","true");
parts.add("deployment-source","process application");
parts.add("loan-approval.bpmn",bpmnFileResource);
parts.add("approve-loan.html", formFileResource1);
parts.add("request-loan.html", formFileResource2);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<MultiValueMap<String, Object>>(parts, headers);
ResponseEntity<DeploymentResponse> response = restTemplate.exchange(deployURL, HttpMethod.POST, request,DeploymentResponse.class);
The files are deployed successfully and I am getting the deployment Id as well as the resource Id for these items(bpmn files and fom files).
However while clicking on start process button in tasklist it shows only loading
Here is my bpmn file
<bpmn:process id="approve-loan" name="Loan Approval" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Loan Request Received" camunda:formKey="embedded:app:request-loan.html">
<bpmn:outgoing>SequenceFlow_0c4zr6d</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_0c4zr6d" sourceRef="StartEvent_1" targetRef="UserTask_11fud4o" />
<bpmn:userTask id="UserTask_11fud4o" name="Approve Loan" camunda:formKey="embedded:app:approve-loan.html" camunda:assignee="john">
<bpmn:incoming>SequenceFlow_0c4zr6d</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1y4c0rn</bpmn:outgoing>
</bpmn:userTask>
<bpmn:endEvent id="EndEvent_1i5bz86" name="Loan Request Approved">
<bpmn:incoming>SequenceFlow_1y4c0rn</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_1y4c0rn" sourceRef="UserTask_11fud4o" targetRef="EndEvent_1i5bz86" />
</bpmn:process>
These are the REST calls I got from the tomcat log file. When I pasted in the browser I got the following response
{“key”:“embedded:app:request-loan.html”,“contextPath”:null}
{“key”:“embedded:app:request-loan.html”,“contextPath”:null}
Does my process engine aware of the form registrations
I deployed along with the bpmn file ??? … therefore not able to resolve the context path to your form…How can I deploy these form files with REST API…please help me out