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 evaluateXPath(java.lang.String xpathExpression)
          evaluates the given XPath 1.0 expression
 void finishActivity(java.lang.String label)
          finish a task, an andpar, orpar, or a parfor.
 Page finishIf(javax.servlet.http.HttpServletRequest req)
           
 java.lang.Object getFormFieldValue(java.lang.String formfield)
          Returns the value of a formfield.
 boolean isActive(java.lang.String task)
          Returns true if there is an active or idle or suspended activity instance in the current process that has the task with the given id.
 boolean isFalse()
          Use as condition dummy, returns false.
 boolean isStartAgent(java.lang.String formfield)
          This method returns true if the formfield contains a user object and the user is the start agent of the current process.
 boolean isTrue()
          Use as condition dummy, always returns true.
 void join(java.lang.String n, java.lang.String mode)
          Expression in andjoin for implementing generalized andjoin
 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
 boolean manualIf()
           
 void parforJoin(java.lang.String n, java.lang.String mode)
          Expression in end parfor for implementing generalized parfor join
 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)
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()
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)
Set a form field to the current agent

Parameters:
formfield - the form field: formid "." fieldame

setFieldToOU

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

Parameters:
formfield - the form field: formid "." fieldame

getFormFieldValue

public java.lang.Object getFormFieldValue(java.lang.String formfield)
Returns the value of a formfield.

Parameters:
formfield - in the syntax formid "." fieldname
Returns:
the value object

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

isStartAgent

public boolean isStartAgent(java.lang.String formfield)
This method returns true if the formfield contains a user object and the user is the start agent of the current process.

Parameters:
formfield - the form field in syntax: formid "." fieldame

isActive

public boolean isActive(java.lang.String task)
Returns true if there is an active or idle or suspended activity instance in the current process that has the task with the given id.

Parameters:
task - the id of a task object
Returns:
true if there is an active task

join

public void join(java.lang.String n,
                 java.lang.String mode)
Expression in andjoin for implementing generalized andjoin

Parameters:
n - number of branches that must be completed
mode - either cancel or none. every other value is taken as none

parforJoin

public void parforJoin(java.lang.String n,
                       java.lang.String mode)
Expression in end parfor for implementing generalized parfor join

Parameters:
n - number of branches that must be completed
mode - either cancel or none. every other value is taken as none

finishActivity

public void finishActivity(java.lang.String label)
finish a task, an andpar, orpar, or a parfor.

Parameters:
label - the label of a step

isTrue

public boolean isTrue()
Use as condition dummy, always returns true.


isFalse

public boolean isFalse()
Use as condition dummy, returns false.


manualIf

public boolean manualIf()

finishIf

public Page finishIf(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
Throws:
java.lang.Exception

evaluateXPath

public boolean evaluateXPath(java.lang.String xpathExpression)
                      throws java.lang.Exception
evaluates the given XPath 1.0 expression

Parameters:
xpathExpression -
Returns:
the result of the XPath-expression
Throws:
java.lang.Exception


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.