Embedded form failure

Hi,

We deploy our webapp to a shared process engine.
Our BPMN uses the formKey=“embedded:app:forms/remediationStart.html”
However, when starting a process via tasklist we get the following message
“!Form failure: Not Found”

Would be very useful if we could get some pointers as to why the embedded form is not being shown.

Here is an over description of our setup.

Camunda version 7.6

Webapp Structure (my-webapp.war)
my-webapp/forms
my-webapp/forms/remediationStart.html
my-webapp/META-INF
my-webapp/META-INF/processes.xml
my-webapp/WEB-INF
my-webapp/WEB-INF/applicationContext.xml
my-webapp/WEB-INF/web.xml
my-webapp/WEB-INF/classes
my-webapp/WEB-INF/classes/remediation.v6.bpmn
my-webapp/WEB-INF/classes/com/example/ProcessLauncherSpring.class
my-webapp/WEB-INF/lib

Our process launcher

@ProcessApplication("Business Process")
public class ProcessLauncherSpring extends ServletProcessApplication implements InitializingBean {
  @Autowired
  private ProcessEngine engine;
  public void afterPropertiesSet() throws Exception {
     logger.info(" ENGINE NAME =" + engine.getName());
  }
}

Catalina.log

Jan 13, 2017 12:48:10 PM com.example.ProcessLauncherSpring afterPropertiesSet
INFO:  ENGINE NAME =default
INFO: ENGINE-07021 ProcessApplication 'Business Process' registered for DB deployments [4d9141b7-d98d-11e6-9414-005056a1615d, 8a345ee0-d98e-11e6-bbdb-005056a1615d]. Will execute process definitions

        loanApproval[version: 1, id: loanApproval:1:4da0d21d-d98d-11e6-9414-005056a1615d]
        remediationProcess[version: 1, id: remediationProcess:1:4da05cec-d98d-11e6-9414-005056a1615d]

Will execute case definitions

        remediateActivity[version: 1, id: remediateActivity:1:4dbcbe8e-d98d-11e6-9414-005056a1615d]

Rest Service
GET https://xxx/workflow-rest/engine/default/deployment/8a345ee0-d98e-11e6-bbdb-005056a1615d/resources

{
"id": "8a345ee2-d98e-11e6-bbdb-005056a1615d",
"name": "loan-request-approver-groups.dmn",
"deploymentId": "8a345ee0-d98e-11e6-bbdb-005056a1615d"
},
  {
"id": "8a345ee4-d98e-11e6-bbdb-005056a1615d",
"name": "loanApproval.v4.bpmn",
"deploymentId": "8a345ee0-d98e-11e6-bbdb-005056a1615d"
},
  {
"id": "8a345ee1-d98e-11e6-bbdb-005056a1615d",
"name": "remediate-case.v6.cmmn",
"deploymentId": "8a345ee0-d98e-11e6-bbdb-005056a1615d"
},
  {
"id": "8a345ee3-d98e-11e6-bbdb-005056a1615d",
"name": "remediation.v6.bpmn",
"deploymentId": "8a345ee0-d98e-11e6-bbdb-005056a1615d"
}

Thanks for your help.

Hi @davekant,

So, you get the notification when you try to open the embedded start form for a process, is that right?

Could you please share the following information:

  • Could you please open the browser console and open the network tab? What response do you get when the following request is executed:
    GET http://<host>:<port>/camunda/api/engine/engine/default/process-definition/<process-definition-id>/startForm
  • Are there any errors visible in the browser console?
  • Are there any exceptions visible in the server log?

Cheers,
Roman

Roman,
I get the notification when attempting to start the process from the tasklist console.
Therefore, I had to use the rest-api to start the process and retrieve the process-definition-id.

You query gives 200 OK and the response is
{“key”:“embedded:app:forms/remediationStart.html”,“contextPath”:"/kyv-workflow-processes"}

When starting the process from tasklist, the error is

Hi @davekant,

Do you get any error when this request is executed:

GET http://<host>:<port>/kyv-workflow-processes/forms/remediationStart.html

  • Are there any other errors visible in the console?
  • Are there any exceptions visible in the server log?

Cheers,
Roman

Roman,
We deploy the war onto a remote unix server which is running tomcat with a shared process engine running on a virtual IP.
On that unix server, the output is
output.txt (1.5 KB)

Hi Dave,

So, if you execute the GET request with curl then you get correct the form.

But are there any errors visible in the browser console (the browser console can be opened by pressing F12 in Chrome for example)? I mean, before you try to open the start form of your process in Tasklist, could you please open the browser console. When you then open the start form, are there any errors in browser console?

BTW, it looks like you start form does not have a closing </form> element at the end.

Cheers,
Roman

1 Like

Roman,
F12 does show a 404 error on the form load.

I have spoken to our network people and it looks like our webapps folder is not being exposed through our http load balancer.

We do expose the camunda console and rest engine so those services are working as expected.

I’ll let you know if this addresses our problem once we make those changes on our side.

Thank you.

NB: Issue has been resolved and was due to our apache configuration.

Hello everyone.

I up this topic because I have an issue of “not found” embedded form inside my task list. I checked my browser (firefox) console and I’ve seen a 404 when trying to get http://localhost:8080/process-cancel-launch-1.0.0/cancel-ineligibility-form.html

I’ve tested the two URLs that Roman suggested
http://localhost:8080/camunda/api/engine/engine/default/process-definition/cancelLaunch:1:110ebe65-737b-11e7-b4bb-0242feeb3417/startForm which gave me :
{
“key”: null,
“contextPath”: “/process-cancel-launch-1.0.0”
}
And http://localhost:8080/kyv-workflow-processes/forms/cancel-ineligibility-form.html which returned me a 404 error

Note that inside my Camunda docker machine, my HTML form is at /camunda/webapps/process-cancel-launch-1.0.0
Any idea why form cannot be found ? Thanks :slight_smile:

Edit

My form is called from BPMN with embedded:app:cancel-ineligibility-form.html as form key in form tab, and this BPMN is placed at /camunda/webapps/process-cancel-launch-1.0.0/WEB-INF/classes/cancelLaunch.bpmn

What was the config that solved the problem you were talking about in this topic ? :slight_smile:
I join the bpmn and form files
cancelLaunch.bpmn (72.8 KB)

form : <form role="form" name="form"> <script cam-script type="text/form-script"> - Pastebin.com

Hi @pvermeil,

Did you finally solve the issue?
I also face it on a Camunda 7.7 Wildfly Shared engine (full distribution).
(web console gives 404 Error).
What should I check in the configurations?

Thanks!

Edit:
I spoke to our network guy, it was an issue of the server blocking the https other than ip_address:port/camunda and ip_address:port/camunda-welcome. So the forms which are on
ip_address:port/myproject/forms were not accessed.

Hi @davekant i have same problem now, how did you manage to show embedded forms, when i run camunda on my local environment everything is perfect but as soon as i try to deploy and run it on server i can’t see any embedded forms (p.s I don’t have any errors in console)
what you have changed in tomcat configuration?

Hi Roman,
I am also desperately looking for a solution to call a secured REST service from Camunda Workflow. I was in middle of my PoC to show my manager how good Camunda is all about. I am using Camunda community version in dockerized form and prepared a workflow, where one node is pointing to a secured REST call like below (not this link only, but my personal services in node.js)

https://reqres.in/api/users

After I get response from, I am planning to parse output to take a particular value and then calling next node with condition.
Everything works in normal http calls, but when I set force to use https only, it doesn’t return the response.

I would be grateful if you can let me know the solution of this problem. Do I need to set anything in configuration to enable https calls ?

Regards
Radha M De

Firstly check that you have the correct project structure.

The form must be accessible from the camunda engine.
In my camunda tomcat webapps folder, I have the following directory/file structure

myProcess

  • forms

    • myProcessStart.html
  • WEB-INF

    • classes
      • MyProcess.bpmn

Using modeller to create MyProcess.bpmn I added a reference to the form

embedded:app:forms/myProcessStart.html

Regards