How to submit external html forms to complete C8 userTask using spring boot

I have external HTML forms in my angular app, my requirement is when a user submits the angular form; An HTTP request should complete this userTask (using spring boot application) and provide the form values to complete it. These form values can be stored as variables in the processInstance.

Hi @Harshdeep_Singh, welcome to the forums! The form would not complete the task. Instead, your form would POST to your backend in the usual way (probably using an Angular HTTP call). Your backend would then call the “complete task” API endpoint with any needed data.

Okay, got it! Can you please share any code snippet to either call complete api or use camundaTaskListClient to complete the task?

@Harshdeep_Singh - I don’t have a code example at this moment. The camunda-task-list-client Java package just calls the REST endpoint. You can use that package (which, it should be noted, is a community-maintained package, not an official Camunda product), or you can call the API yourself. The Tasklist API is a RESTful API.

Thanks for the help @nathan.loding
I’m using camundaTaskListClient java package with self managed cluster and haven’t used keycloak or any identity to authorize. Using simpleAuth approach with ‘demo’ (default login user).
Getting an error in creating the connection with the cluster :frowning_face:
Below is the code snippet and example:

SimpleConfig simpleConf = new SimpleConfig();
	        simpleConf.addProduct(Product.TASKLIST, new SimpleCredential("demo", "demo"));
	        Authentication auth = SimpleAuthentication.builder().simpleConfig(simpleConf).build();

Getting exception :
Caused by: java.lang.RuntimeException: Unable to authenticate
at io.camunda.common.auth.SimpleAuthentication.retrieveToken(SimpleAuthentication.java:70) ~[java-common-8.4.0.jar:8.4.0]
at io.camunda.common.auth.SimpleAuthentication.getTokenHeader(SimpleAuthentication.java:91) ~[java-common-8.4.0.jar:8.4.0]

Hi @Harshdeep_Singh - I would recommend opening an issue in the GitHub repository for that package. I don’t think the Self-Managed APIs are accessible using that simple authentication method.

Hi @Harshdeep_Singh - I see you already have a topic open regarding the Tasklist authentication. Let’s keep the conversation in that thread!