public WorkflowInstance getWorkflowInstanceByTaskInstance(
      String workflowTaskId, FetchModel.FETCH_TYPE fetch_type) {
    WorkflowInstance workflowInstance =
        this.workflowComponent.getWorkflowInstanceByTaskInstance(workflowTaskId);

    if (fetch_type.equals(FetchModel.FETCH_TYPE.FORUPDATE)) return workflowInstance;
    else return new WorkflowInstanceInfo(workflowInstance);
  }
  @Override
  public WorkflowInstance getWorkflowInstanceById(
      String workflowinstanceId, FetchModel.FETCH_TYPE fetch_type) {

    WorkflowInstance workflowInstance =
        workflowComponent.getWorkflowInstanceById(workflowinstanceId);

    if (fetch_type.equals(FetchModel.FETCH_TYPE.FORUPDATE)) return workflowInstance;
    else return new WorkflowInstanceInfo(workflowInstance);
  }