Referencing resources

I’m working on optimising a large collection of workflows that have lots of repetitive tasks, configurations.

In my approach, I’m splitting small, reusable bits into own processes and call them using a Call Activity, with the Called element having type:BPMN, called element: mySubProcess. These “components” are deployed from a single file, along their own script files. Let’s call this: “core” components.

One of these sub processes has a user task with a form of “Embedded or External Task Forms” and a formKey that looks like this: "embedded:deployment:myForm.html". This myForm.html doesn’t exist in the “core” components, since it’s reusable and expected to be passed from the parent process. Passing a variable and pointing the formKey to ${formVar} works (works as in correctly reads the value), but cannot access the myForm.html in the parent process. I tried several approaches to point to a different deployment resources, all failed, some:

  • embedded:../17bb6c67-8ece-11ee-9542-0242ac190003/forms/form.html
  • embedded:../17bb6c67-8ece-11ee-9542-0242ac190003/form.html
  • embedded:17bb6c67-8ece-11ee-9542-0242ac190003:form.html

Any clue if this is possible? I’ve seen some example on github that’s looking like this: embedded:http://localhost:1234/myForm.html but this seems extreme and would be very hard to manage from a deployment stand point in our organisation.

Hi @ardh-vp,

the binding with deployment is quite tightly coupled to the process model. The form has to be deployed with the process model that calls it.

If you use embedded:app as binding, you can call a form, that is part of the application (src/main/resources…) and exists in the classpath.

Hope this helps, Ingo

2 Likes

Thanks for the reply @Ingo_Richtsmeier!

I’m still exploring your suggestion. Is it possible to upload these embedded:app files through the REST API? We’re deploying processes through the REST API, so simply using another endpoint to put these forms would greatly help.

What other bindings are available? Perhaps I can find something else that better suits my needs.

Hi @ardh-vp,

I’m not sure. They are picked up from the web server, and usually you place the HTML files into src/main/resources/static in your Spring Boot application.

I don’t know if you can change these HTML files via REST API later, of you can serve the file, that is living in another location, from the web server.

Maybe you can implement a servlet, that delivers the forms from a database via a (static) web server URL?

Eventually, embedded:app picks the forms from a convenient location from the web server, where deployment picks the form from a given place in the database (referenced by the deployment ID).

Hope this helps, Ingo

1 Like