Using REST API to send a signal with a business key


What’s the recommended way to use REST to send a signal with a business key to Flowable?

I’m aware of but I don’t see any documentation related to business keys.

Do I submit the business key as a variable and then use a script task to convert the variable to business key? Or is there a better way?

I tried using a Script Task with Script Format Groovy to set the business key:
businessKey = execution.getVariable(“BK”);
println(“BK->” + execution.getBusinessKey() + “<-BK”);

The script produces results as expected with the business key getting set and retrieved.

However, I can’t see the business key in the instance in Flowable Admin http://localhost:9988/flowable-admin/#/process-instances

BTW, this is for 6.3.1.

Could somebody provide an example of how to do this?


1 Like

The original problem about setting business keys via signals remains.

For script tasks, don’t use execution.setBusinessKey
Use, runtimeService.updateBusinessKey(execution.processInstanceId, businessKey);

I can see an updated value in Flowable Admin