com.groiss.wf
Class SystemAction

java.lang.Object
  extended by com.groiss.wf.SystemAction

public class SystemAction
extends java.lang.Object

This class provides some methods useful for preprocessing and postconditions.


Constructor Summary
SystemAction()
           
 
Method Summary
 void autoTake()
          This method performs a take when the activity instance is assigned to a role and there is exactly one user having this role.
 void cancelActivity(java.lang.String name)
          Cancel the activity: finishs the activity with the given task id
 void cancelProcess()
          Cancel the whole process.
 boolean lock(java.lang.String name)
          Add a lock to the process instance.
 boolean log(java.lang.String message, java.lang.String level)
          writes the argument on the log
 void setFieldToAgent(java.lang.String formfield)
          Set a form field to the current agent
 void setFieldToOU(java.lang.String formfield)
          Set a form field to the home org unit of agent
 void setFieldToValue(java.lang.String formfield, java.lang.String value)
          Set a form field to the home org unit of agent
 boolean unlock(java.lang.String name)
          Removes the lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemAction

public SystemAction()
Method Detail

lock

public boolean lock(java.lang.String name)
             throws java.lang.Exception
Add a lock to the process instance.

Parameters:
name - name of the lock
Returns:
always true
Throws:
java.lang.Exception

unlock

public boolean unlock(java.lang.String name)
               throws java.lang.Exception
Removes the lock.

Parameters:
name - name of the lock
Returns:
always true
Throws:
java.lang.Exception

cancelActivity

public void cancelActivity(java.lang.String name)
                    throws java.lang.Exception
Cancel the activity: finishs the activity with the given task id

Parameters:
name - the id of a task
Throws:
java.lang.Exception

cancelProcess

public void cancelProcess()
                   throws java.lang.Exception
Cancel the whole process.

Throws:
java.lang.Exception

autoTake

public void autoTake()
              throws java.lang.Exception
This method performs a take when the activity instance is assigned to a role and there is exactly one user having this role.

Throws:
java.lang.Exception

log

public boolean log(java.lang.String message,
                   java.lang.String level)
writes the argument on the log

Parameters:
message - the message
level - the log level
Returns:
true

setFieldToAgent

public void setFieldToAgent(java.lang.String formfield)
                     throws java.lang.Exception
Set a form field to the current agent

Parameters:
formfield - the form field: formid "." fieldame
Throws:
java.lang.Exception

setFieldToOU

public void setFieldToOU(java.lang.String formfield)
                  throws java.lang.Exception
Set a form field to the home org unit of agent

Parameters:
formfield - the form field: formid "." fieldame
Throws:
java.lang.Exception

setFieldToValue

public void setFieldToValue(java.lang.String formfield,
                            java.lang.String value)
                     throws java.lang.Exception
Set a form field to the home org unit of agent

Parameters:
formfield - the form field: formid "." fieldame
Throws:
java.lang.Exception


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.