org.camunda.bpm.engine.cdi.annotation
Annotation Type CompleteTask


@InterceptorBinding
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface CompleteTask

Annotation signaling that a task is to be completed after the annotated method returns. Requires that the current unit of work (conversation or request) is associated with a task. This has the same effect as calling BusinessProcess.completeTask().

Example: after this method returns, the current task is completed

 @CompleteTask 
 public void respond(String response, Message message) {
  message.setResponse(response);
 } 
 
If the annotated method throws an exception, the task is not completed.

Author:
Daniel Meyer
See Also:
BusinessProcess.startTask(String), BusinessProcess.completeTask()

Optional Element Summary
 boolean endConversation
          Specifies whether the current conversation should be ended.
 

endConversation

public abstract boolean endConversation
Specifies whether the current conversation should be ended.

Default:
false


Copyright © 2016 camunda services GmbH. All rights reserved.