org.jprocessunit.addon.jpd
Class CompleteTaskEvent

java.lang.Object
  extended by org.jprocessunit.ActionEvent
      extended by org.jprocessunit.addon.jpd.CompleteTaskEvent
All Implemented Interfaces:
ProcessEvent

public class CompleteTaskEvent
extends ActionEvent

JProcessUnit ActionEvent class used to bring a WLI task to a completed state.

Author:
Reza Shafii

Constructor Summary
CompleteTaskEvent(com.bea.wli.worklist.api.TaskSelector taskSelector)
          The action event is executed on the first task matches the selector.
 
Method Summary
 void performAction()
          This method ensures that the task identified by taskSelector has its state changed to to completed.
 void setAssignToUser(java.lang.String userName)
          Used when the task has not been assigned to a specific user, in which case the action event first assignes the task to userName and then completes the task.
 void setTaskResponse(java.io.File taskResponse)
          Sets the response paramter of the task to which this instance is tied to the XML content of the given file.
 void setTaskResponse(java.lang.String taskResponse)
          Sets the response paramter of the task to which this instance is tied to the XML content of the given String.
 void setTaskSelector(com.bea.wli.worklist.api.TaskSelector taskSelector)
          The wait event is satisfied as soon as a single task matches the selector.
 
Methods inherited from class org.jprocessunit.ActionEvent
assertEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompleteTaskEvent

public CompleteTaskEvent(com.bea.wli.worklist.api.TaskSelector taskSelector)
The action event is executed on the first task matches the selector.

Parameters:
taskSelector -
Method Detail

setTaskResponse

public void setTaskResponse(java.io.File taskResponse)
Sets the response paramter of the task to which this instance is tied to the XML content of the given file.

Parameters:
taskResponse -

setTaskResponse

public void setTaskResponse(java.lang.String taskResponse)
Sets the response paramter of the task to which this instance is tied to the XML content of the given String.

Parameters:
taskResponse -

setTaskSelector

public void setTaskSelector(com.bea.wli.worklist.api.TaskSelector taskSelector)
The wait event is satisfied as soon as a single task matches the selector.

Parameters:
taskSelector -

setAssignToUser

public void setAssignToUser(java.lang.String userName)
Used when the task has not been assigned to a specific user, in which case the action event first assignes the task to userName and then completes the task. If assignToUser is not set and the task does not have a user already assigned, then the user "weblogic" is used as default.

Parameters:
userName -

performAction

public void performAction()
This method ensures that the task identified by taskSelector has its state changed to to completed. If the task is not in a state to be completed, then this method, ensures that the task is brought to the intermediary states first (started then assigned) before completing it.

Specified by:
performAction in class ActionEvent


JProcessUnit API