Time for action – starting a new process instance

As we have deployed the process into the Activiti Engine, now we have to start the process instance. For that, we have to perform the following steps:

  1. To start the process using API, we have to implement the given code in the class file:
    // Starting the Deployed Process Date date = new Date(); Map<String, Object> variables = new HashMap<String, Object>(); variables.put("customerName", "Irshad"); variables.put("customerEamil", "irshad.mansuri@attuneinfocom.com"); variables.put("trainingTopic", "Activiti"); variables.put("trainingDate", date); RuntimeService runtimeService = processEngine.getRuntimeService(); ProcessInstance processInstance = runtimeService .startProcessInstanceByKey("trainingProcess", ...

Get Activiti 5.x Business Process Management Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.