Spring MVC for external forms

Hi Team,

May I know if JSF is the only option to build external task forms or can we use spring MVC as an alternative (specially when using camunda-spring-boot)?

Thanks for your time.

Just wondering if this is possible to achieve at all. Any pointers are greatly appreciated.

Thanks.

Hi,
I don’t see why not. I would probably use spring Mvc for pageflow to complement process flow. I would also assume that your forms would be considered external forms and thus your page flow will need to use the task complete api or callback…
Regards
Rob

@Webcyberrob Thanks Rob. Yes, MVC seems to work well without any issues. Brilliant.

@Bharat, may I know how do you do it with Spring form? Can you please give a guideline? thanks.

@Brandon We have used it as an external task form. Below are the steps

BPM process: A user task with external form key
ex: camunda:formKey="/admin/task/handler"

Spring MVC handler for the key:
@RequestMapping(value = “/admin/task/handler”, method = RequestMethod.GET)
public ModelAndView taskHandler(@RequestParam(“taskId”) String taskId,
@RequestParam(“callbackUrl”) String callbackUrl,
HttpServletRequest request) {

// Make sure user has logged in - You can extract this into a spring filter
// Business logic
}

Hope this helps

Hi @Bharat,

Are you using “SpringServletProcessApplication”?

I’m still having problem getting the Spring Framework demo (shared process engine) to work. https://docs.camunda.org/get-started/spring/shared-process-engine/#alternative-configuration-using-shared-process-engine

The problem that I had Camunda Spring shared container is not working

How did you get your application to work with Spring Framework on shared process engine?

@Brandon We did a POC using standard maven java web application based on camunda spring boot-1.2.0-SNAPSHOT & Camunda 7.4.0 to test various usecases.

Hi, Bharat.

Could you send me a full example of what you did?

Thanks in advance.

Regards, Jesús.

Hello Bharat,
Can you provide details about your PoC?

1 Like