Steps for this task
ProcessTemplateData[] processTemplates = process.queryProcessTemplates ("PROCESS_TEMPLATE.CAN_RUN_INTERRUP=TRUE" "PROCESS_TEMPLATE.NAME", newInteger(50), null);
Customer input = new Customer("Smith"); PIID piid = process.initiate("CustomerTemplate", "CustomerOrder", new ClientObjectWrapper(input));
The starter of the process instance is set to the caller of the request and receives a work item for the process instance. The process administrators, readers, and editors of the process instance are determined and receive work items for the process instance. The starting activity instances are determined and either started automatically or, if they are person activities or receive events, work items are created for the potential owners.