imo it is an oversight. I can't think of a good reason.
What would you think of having an .cancel() take the default transition, having and .cancel(Transition trans) or .cancel(String transName) take the one specified. The required .end(...) methods are already available.
Not taking any transition is a difficult case. If this is the only task, the process would in in undefined state. If this task(node) is one of the teeth(?) of a fork, the join needs the token, so it has to take a transition for the join to work. Only if there are multiple tasks in a node this is an option. Let's leave this one out for the moment
I agree 100% with you. I saw your comments in the JIRA issue last night, and I would have suggested the same.
this is a tricky one.
currently, the cancel method indeed includes the call to end() on purpose. the desired behaviour in case one fo the task instances is cancelled depends on the process. it cannot be defined in a general manner.
in the current code, it would be the most logical to add the
apart from that i have been thinking about abstracting the state machine inside of a task instance. states being: created, started, cancelled, suspended, and others are thinkable. i'm in doubt wether this justifies it's own statemachine (could be implemented in jpdl:-) or wether this just be a hard coded state machine.
I already added these in my local tree but I STILL HAVE TO WRITE TESTCASES TO PREVENT GETTING SPANKED ;-). Will check these in over the weekend.
Regarding the 'states' of a task, hardcoded would imo suffice for now. The started is interesting, it kind of allows the ok, I'm working on it, but do not leave the browser open. It can provide additional BI info since the actual duration of performing the task can be much shorter than the time between creation of the task and ending/cancelling it