I am not sure what you try to do, but an AssignmentHandler or an EventListener is not the right place to complete a task or send any signals to the process instance.
Maybe what you try to do can be implemented with the <custom /> tag.
Basically you implement a ExternalActivityBehaviour and use execution.waitForSignal() or execution.take(transition) if you want the process instance to stop or take a certain transition.
I'm sorry if my question was not clear enough. I have some business logic I need to perform for a task, and I have two requirements:
1) I need to automatically start performing the code for the business logic when the task is assigned.
2) I need to automatically alert jbpm when the business logic code finishes so it can mark the task as complete.
For requirement 1, it seemed like either an AssignmentHandler or an EventWatcher that was watching for the assign event would work to know when the task was assigned, but neither one seems capable of handling the second requirement.
Can you please explain what kind of task are you talking about?
If it's a human task why do you want to mark it as "complete" by your business logic and if it is business logic that is performed within the task why do you assign it and to whom?
Did you check out