/* (non-Javadoc)
* @see org.fireflow.engine.ITaskInstance#getTask()
*/
public Task getTask() throws EngineException {
if (rtCtx==null)System.out.println("====Inside taskInstance rtCtx is null");
IDefinitionService definitionService = rtCtx.getDefinitionService();
if (definitionService==null)System.out.println("====Inside taskInstance definitionService is null");
WorkflowDefinition workflowDef = definitionService.getWorkflowDefinitionByProcessIdAndVersionNumber(this.getProcessId(), this.getVersion());
if (workflowDef == null) {
return null;
}
return (Task) workflowDef.getWorkflowProcess().findWFElementById(this.getTaskId());