站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.0.4 API 英文版文档

TaskInstance (jbpm-3.0.4) - JBoss JBPM 3.0.4 API 英文版文档


org.jbpm.taskmgmt.exe
Class TaskInstance

java.lang.Object
  extended byorg.jbpm.taskmgmt.exe.TaskInstance
All Implemented Interfaces:
Assignable, java.io.Serializable

public class TaskInstance
extends java.lang.Object
implements java.io.Serializable, Assignable

is one task instance that can be assigned to an actor (read: put in someones task list) and that can trigger the coninuation of execution of the token upon completion.

See Also:
Serialized Form

Field Summary
protected  java.lang.String actorId
           
protected  java.util.List comments
           
protected  java.util.Date create
           
protected  java.lang.String description
           
protected  java.util.Date dueDate
           
protected  java.util.Date end
           
protected  boolean isBlocking
           
protected  boolean isCancelled
           
protected  boolean isSignalling
           
protected  java.lang.String name
           
protected  java.util.Set pooledActors
           
protected  java.lang.String previousActorId
           
protected  int priority
           
protected  java.util.Date start
           
protected  SwimlaneInstance swimlaneInstance
           
protected  Task task
           
protected  TaskMgmtInstance taskMgmtInstance
           
protected  Token token
           
 
Constructor Summary
TaskInstance()
           
TaskInstance(java.lang.String taskName)
           
TaskInstance(java.lang.String taskName, java.lang.String actorId)
           
 
Method Summary
 void addComment(Comment comment)
           
 void addComment(java.lang.String message)
           
 void assign(ExecutionContext executionContext)
           
 void cancel()
          cancels this task.
 void copySwimlaneInstanceAssignment(SwimlaneInstance swimlaneInstance)
          copies the assignment (that includes both the swimlaneActorId and the set of pooledActors) of the given swimlane into this taskInstance.
 void create()
           
 void create(ExecutionContext executionContext)
           
 void end()
          marks this task as done.
 void end(java.lang.String transitionName)
          marks this task as done and specifies the name of a transition leaving the task-node for the case that the completion of this task instances triggers a signal on the token.
 void end(Transition transition)
          marks this task as done and specifies a transition leaving the task-node for the case that the completion of this task instances triggers a signal on the token.
 java.lang.String getActorId()
           
 java.util.List getAvailableTransitions()
          is the list of transitions that can be used in the end method and it is null in case this is not the last task instance.
 java.util.List getComments()
           
 java.util.Date getCreate()
           
 java.util.Date getDueDate()
           
 java.util.Date getEnd()
           
 long getId()
           
 java.lang.String getName()
           
 java.util.Set getPooledActors()
          gets the pool of actors for this task instance.
 java.lang.String getPreviousActorId()
           
 int getPriority()
           
 java.util.Date getStart()
           
 SwimlaneInstance getSwimlaneInstance()
           
 Task getTask()
           
 java.util.List getTaskFormParameters()
           
 TaskMgmtInstance getTaskMgmtInstance()
           
 Token getToken()
           
 boolean hasEnded()
           
 boolean isBlocking()
           
 boolean isCancelled()
           
 boolean isLast()
           
 boolean isSignalling()
           
 boolean isStartTaskInstance()
           
 void setActorId(java.lang.String actorId)
          (re)assign this task to the given actor.
 void setActorId(java.lang.String actorId, boolean overwriteSwimlane)
          (re)assign this task to the given actor.
 void setBlocking(boolean isBlocking)
           
 void setCreate(java.util.Date create)
           
 void setDueDate(java.util.Date dueDate)
           
 void setEnd(java.util.Date end)
           
 void setId(long id)
           
 void setName(java.lang.String name)
           
 void setPooledActors(java.util.Set pooledActors)
           
 void setPooledActors(java.lang.String[] actorIds)
          sets the resource pool for this assignable as a set of PooledActors.
 void setPriority(int priority)
           
 void setSignalling(boolean isSignalling)
           
 void setSwimlaneInstance(SwimlaneInstance swimlaneInstance)
           
 void setTask(Task task)
           
 void setTaskMgmtInstance(TaskMgmtInstance taskMgmtInstance)
           
 void setToken(Token token)
           
 void start()
          can optionally be used to indicate that the actor is starting to work on this task instance.
 void start(java.lang.String actorId)
          convenience method that combines a setActorId(String) and a start().
 void submitParameters(java.util.Map parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

actorId

protected java.lang.String actorId

create

protected java.util.Date create

start

protected java.util.Date start

end

protected java.util.Date end

dueDate

protected java.util.Date dueDate

priority

protected int priority

isCancelled

protected boolean isCancelled

isSignalling

protected boolean isSignalling

isBlocking

protected boolean isBlocking

task

protected Task task

token

protected Token token

swimlaneInstance

protected SwimlaneInstance swimlaneInstance

taskMgmtInstance

protected TaskMgmtInstance taskMgmtInstance

pooledActors

protected java.util.Set pooledActors

comments

protected java.util.List comments

previousActorId

protected java.lang.String previousActorId
Constructor Detail

TaskInstance

public TaskInstance()

TaskInstance

public TaskInstance(java.lang.String taskName)

TaskInstance

public TaskInstance(java.lang.String taskName,
                    java.lang.String actorId)
Method Detail

setTask

public void setTask(Task task)

create

public void create()

create

public void create(ExecutionContext executionContext)

assign

public void assign(ExecutionContext executionContext)

isStartTaskInstance

public boolean isStartTaskInstance()

copySwimlaneInstanceAssignment

public void copySwimlaneInstanceAssignment(SwimlaneInstance swimlaneInstance)
copies the assignment (that includes both the swimlaneActorId and the set of pooledActors) of the given swimlane into this taskInstance.


getPooledActors

public java.util.Set getPooledActors()
gets the pool of actors for this task instance. If this task has a simlaneInstance and no pooled actors, the pooled actors of the swimlane instance are returned.


setActorId

public void setActorId(java.lang.String actorId)
(re)assign this task to the given actor. If this task is related to a swimlane instance, that swimlane instance will be updated as well.

Specified by:
setActorId in interface Assignable

setActorId

public void setActorId(java.lang.String actorId,
                       boolean overwriteSwimlane)
(re)assign this task to the given actor.

Parameters:
actorId - is reference to the person that is assigned to this task.
overwriteSwimlane - specifies if the related swimlane should be overwritten with the given swimlaneActorId.

setPooledActors

public void setPooledActors(java.lang.String[] actorIds)
Description copied from interface: Assignable
sets the resource pool for this assignable as a set of PooledActors. Use this method to offer the task to a group of users. Each user in the group can then take the task by calling the Assignable.setActorId(String).

Specified by:
setPooledActors in interface Assignable

start

public void start()
can optionally be used to indicate that the actor is starting to work on this task instance.


start

public void start(java.lang.String actorId)
convenience method that combines a setActorId(String) and a start().


cancel

public void cancel()
cancels this task.


end

public void end()
marks this task as done. If this task is related to a task node this might trigger a signal on the token.

See Also:
end(Transition)

end

public void end(java.lang.String transitionName)
marks this task as done and specifies the name of a transition leaving the task-node for the case that the completion of this task instances triggers a signal on the token. If this task leads to a signal on the token, the given transition name will be used in the signal. If this task completion does not trigger execution to move on, the transitionName is ignored.


end

public void end(Transition transition)
marks this task as done and specifies a transition leaving the task-node for the case that the completion of this task instances triggers a signal on the token. If this task leads to a signal on the token, the given transition name will be used in the signal. If this task completion does not trigger execution to move on, the transition is ignored.


hasEnded

public boolean hasEnded()

addComment

public void addComment(java.lang.String message)

addComment

public void addComment(Comment comment)

getComments

public java.util.List getComments()

getTaskFormParameters

public java.util.List getTaskFormParameters()

submitParameters

public void submitParameters(java.util.Map parameters)

isLast

public boolean isLast()

getAvailableTransitions

public java.util.List getAvailableTransitions()
is the list of transitions that can be used in the end method and it is null in case this is not the last task instance.


getActorId

public java.lang.String getActorId()

getDueDate

public java.util.Date getDueDate()

setDueDate

public void setDueDate(java.util.Date dueDate)

getEnd

public java.util.Date getEnd()

setEnd

public void setEnd(java.util.Date end)

setCreate

public void setCreate(java.util.Date create)

getId

public long getId()

setId

public void setId(long id)

getStart

public java.util.Date getStart()

getTaskMgmtInstance

public TaskMgmtInstance getTaskMgmtInstance()

setTaskMgmtInstance

public void setTaskMgmtInstance(TaskMgmtInstance taskMgmtInstance)

getToken

public Token getToken()

setToken

public void setToken(Token token)

setSignalling

public void setSignalling(boolean isSignalling)

isSignalling

public boolean isSignalling()

isCancelled

public boolean isCancelled()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

isBlocking

public boolean isBlocking()

setBlocking

public void setBlocking(boolean isBlocking)

getCreate

public java.util.Date getCreate()

getTask

public Task getTask()

setPooledActors

public void setPooledActors(java.util.Set pooledActors)

getSwimlaneInstance

public SwimlaneInstance getSwimlaneInstance()

setSwimlaneInstance

public void setSwimlaneInstance(SwimlaneInstance swimlaneInstance)

getPreviousActorId

public java.lang.String getPreviousActorId()

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)


Version : jbpm-3.0.4