How to set the BusinessKey later not in the beginning

@Niall
I am thinking how set the business key of the process later on because at the beginning I dont have it I need to get it after a service call and then I will set it. How should I do it?

@hahi You can add the ExecutionListener or JavaDelegate to the service to set the businessKey.

@Component
public class BusinessKeyGenerateDelegate implements JavaDelegate {

	@Override
	public void execute(DelegateExecution execution) throws Exception {
		execution.setProcessBusinessKey("businessKey");
	}

}
1 Like