use of org.apache.oozie.executor.jpa.WorkflowActionInsertJPAExecutor in project oozie by apache.
the class XDataTestCase method addRecordToWfActionTable.
protected WorkflowActionBean addRecordToWfActionTable(String wfId, String actionName, WorkflowAction.Status status, String execPath, boolean pending) throws Exception {
WorkflowActionBean action = createWorkflowAction(wfId, actionName, status, pending);
action.setExecutionPath(execPath);
try {
JPAService jpaService = Services.get().get(JPAService.class);
assertNotNull(jpaService);
WorkflowActionInsertJPAExecutor actionInsertCmd = new WorkflowActionInsertJPAExecutor(action);
jpaService.execute(actionInsertCmd);
} catch (JPAExecutorException je) {
je.printStackTrace();
fail("Unable to insert the test wf action record to table");
throw je;
}
return action;
}
Aggregations