Get BPMN 2.0 XML

Hello, I’m to trying retrieve the diagram XML via the [REST] API, like this:

I do get the response(The XML) from Postman, but in my AJAX petition I’m getting this error when I try to render the diagraman.

@Minrg enable cors settings on camunda server

Any idea how? I’m using SpringBoot

@Minrg,

@Configuration
public class CORSFilterConfig {

  @Bean
  public CorsFilter corsFilter() {
    UrlBasedCorsConfigurationSource corsConfigurationSource = new UrlBasedCorsConfigurationSource();
    CorsConfiguration corsConfiguration = new CorsConfiguration();
    corsConfiguration.setAllowCredentials(true);
    corsConfiguration.addAllowedHeader("*");
    corsConfiguration.addAllowedOrigin("*");
    corsConfiguration.addAllowedMethod(HttpMethod.GET);
    corsConfiguration.addAllowedMethod(HttpMethod.POST);
    corsConfiguration.addAllowedMethod(HttpMethod.OPTIONS);
    corsConfiguration.addAllowedMethod(HttpMethod.PATCH);
    corsConfiguration.addAllowedMethod(HttpMethod.PUT);
    corsConfiguration.addAllowedMethod(HttpMethod.HEAD);
    corsConfiguration.addAllowedMethod(HttpMethod.DELETE);
    corsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
    return new CorsFilter(corsConfigurationSource);
  }
}
2 Likes

Any idea about the Error: “required args <xml=string>” ?

Can you provide full stacktrace. Seems like some of the string field you’ve configured wrong value in BPMN file