*/
@Transactional(propagation = Propagation.REQUIRED)
public Object startProcess(VacationData data)
{
// Create the process context and start the process
TokenContext token = getProcessFacade().createToken();
// We need to retrieve the process' output parameters, so do not delete the process after it has completed.
token.setDeleteAfterCompletion(false);
token.setDebuggerId("Deb1");
// Start the process
Map<String, Object> inputParam = new HashMap<String, Object>();
inputParam.put("Data", data);
getProcessFacade().startToken(token, "/VacationRequest/HandleVacationRequest.Start", inputParam);
// Note: We do not have asynchronous processing in the workflow, so we use blocking execution
// (i. e. execute the process right here in this thread).
// Otherweise, the execution would have to be done by some worker thread (blocking execution).
getProcessFacade().executePendingContextsInThisThread();
return token.getId();
}