How to use a bonita connector when creating a process programatically?
We are creating a process programatically, out-of-the box by using the bonita REST API via the bonita-client available in:
We are able to create and deploy a simple process (and execute it via the bonita portal). However now we are trying to programatically create a service task with a REST connector call. To to it, we use:
ConnectorDefinitionBuilder connectorBuilder = automatctask.addConnector("CallRestDATA", "rest-get", "1.0.0", ConnectorEvent.ON_ENTER);
However we always get an error, and in bonita portal we can see the following message:
The Process cannot be enabled.
Connectors must be resolved before enabling the Process.
Intuitively, we have tried to instantiate a ConnectorDescriptor but we don't know to link with the task. We couldn't find in the documentation any example. Do you have any hint?
Thanks in advance.
Sean McP, thanks for your response. We have put an example of how to do it, here:
Maybe this can be helpful for other people.
Have you added the correct code to
Add connector implementation
PS: As this reply offers an answer your question, and if you like it, please Mark UP or as Resolved.