if (!(processValue instanceof ProcessDefinition)) {
context.setError("Error starting process", "Attempted to start something other than a process");
return;
}
final ProcessDefinition definition = (ProcessDefinition) processValue;
final ProcessInstance instance = definition.createProcessInstance();
// Signal the root token based on the following criteria:
// 1. If there is no start task, and
// 2. If the root token is still at the start state, and
// 3. If the start state has a default leaving transition, then
// signal the token along the default transition.