t = this.stateFactory.beginTransaction(); this.stateFactory.deleteObject(processInstance); t.commit();
t = this.stateFactory.beginTransaction(); this.stateFactory.deleteObject(processInstance); try { t.commit(); } catch (StateFailureException te) { fail(); }
	public void testLoadSaveObjects() throws Exception {		IProcessDefinition processDefinition = getProcessDefinition();		ITransaction t = this.stateFactory.beginTransaction();		IProcessInstance processInstance = this.stateFactory				.createProcessInstance(processDefinition);		this.stateFactory.saveObject(processInstance);		t.commit();		ITaskDefinition taskDefinition = processDefinition.getFirstTask();		IFOE foe = this.stateFactory.createFOE(processInstance);		t = this.stateFactory.beginTransaction();		ITaskInstance taskInstance = this.stateFactory.createTaskInstance(				taskDefinition, processInstance, foe);		this.stateFactory.saveObject(processInstance);		this.stateFactory.saveObject(taskInstance);		t.commit();		t = this.stateFactory.beginTransaction();		this.stateFactory.deleteObject(taskInstance);		t.commit();		assertFalse(processInstance.getTaskInstances().contains(taskInstance));		t = this.stateFactory.beginTransaction();		this.stateFactory.deleteObject(processInstance);		t.commit();	}