ServiceTask is not working

I am trying to setup the servicetask but i am unable to deploy due to BPMN parse issue.

i am getting below error.

One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on serviceTask. | loanApprovalService.bpmn. and i am using connector and http-connector.

what are you trying to achieve and what have you done so far?
Uploading your model will help as well.

You need to configure implementation for service task to perform some task.

Configure service task like this:

Your Java class implementation should look like below:

package com.example;

public class HelloWorld implements JavaDelegate {

	public void execute(DelegateExecution execution) throws Exception {
      //Your code

Refer the docs: Service Task |

1 Like

i want to use connector

Refer this blog for http connector usage.

BPMN File: connector.bpmn (23.7 KB)

Check this too:

Why do you want to use connectors?
They have a few draw backs, you should first consider external tasks, in care they’re more applicable.

okay. Could you please let me know those drawbacks? We are creating custom connectors as we want to use Eureka to identify the app based on app name for zone affinity.

Do you have a better example to know more about the external task to be used for service invocations? Could you please provide me the same.

I can give you an idea of the downsides:
The config for connectors are embedded in the XML model which makes them harder to test. It also means that due to how versioning works in the engine any change in your connetor would change the version of the modeler.

External Tasks work on a publish subscribe methodology, meaning it’s much easier to maintain independent development cycles for the process and service. It also let you use any programing language of your choice in stead of having to use compatible scripts.

Hi @Shaffic_Jan,

I totally agree with the drawbacks of the connectors.

To use it you have to configure the camunda-connect library:

This should solve your parsing issue.

Hope this helps, Ingo