if(!isActive())
{
if(getEntryState() == WorkflowEntry.UNKNOWN)
throw new WorkflowException("The workflow with id " + workflowId + " is in an unknown state - the database could be down or the workflow corrupt");
else
throw new InvalidActionException("Workflow " + workflowId + " is no longer active");
}
if(currentWorkflows.contains(id))
{
throw new WorkflowException("The selected workflow is executing...");
}