Embedded forms not working with a custom servlet application extending AbstractProcessApplication

Hello,

we use Scalatra to write web applications in Scala and we managed correctly to develop a process application by extending AbstractProcessApplication.

However, when trying to use custom embedded forms, those are not returned and the tasklist shows “loading” forever.

We investigated the network tab of Chrome and we see that the form answer returns the following:

{key: “embedded:app:forms/company-users-detail.html”, contextPath: null}

What are we missing?

We found the solution: we looked into the ServletProcessApplication and discovered among the properties it returns to the process engine, the Context Path is included.

public Map<String, String> getProperties() {
    Map<String, String> properties = new HashMap<String, String>();

    // set the servlet context path as property
    properties.put(ProcessApplicationInfo.PROP_SERVLET_CONTEXT_PATH, servletContextPath);

    return properties;
}

I will probably submit a PR for the Tasklist to show an error if the form type is embedded and contextPath is null.

4 Likes