Hi,
First I’m sorry for my bad English
For a student project i’am trying to instantiate a processe instance with a message start event, but don`t work.
I need to get a message from an API in my start event name SendMessage and start the next task, your name is Send Email.
How do I post a message from my API to my sendMessage name start event message?
This is my very Simple BPM example
send.bpmn (2.7 KB)
and my code.
public class SendMessage implements JavaDelegate {
private final Logger LOGGER = Logger.getLogger(SendMessage.class.getName());
@Override
public void execute(DelegateExecution execution) throws Exception {
RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
runtimeService.startProcessInstanceByMessage("SendMessage");
this.LOGGER.info("\n\n ... my process=" + execution.getProcessDefinitionId() + ", activtyId=" + execution.getCurrentActivityId() + ", activtyName='" + execution.getCurrentActivityName() + "', processInstanceId=" + execution.getProcessInstanceId() + ", businessKey=" + execution.getProcessBusinessKey() + ", executionId=" + execution.getId() + " \n\n");
}
}
How can we realize this? Sorry for my question, I’m a high school student and never programmed.
Thanks =)