public class SystemAction
extends java.lang.Object
Constructor and Description |
---|
SystemAction() |
Modifier and Type | Method and Description |
---|---|
void |
addDocument(java.lang.String origin,
java.lang.String filepath,
java.lang.String docpath)
Add a document to the process folder.
|
void |
addFolder(java.lang.String name)
add a folder to the process.
|
void |
addSubform(java.lang.String form,
java.lang.String id)
Add a subform.
|
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: finishes the activity with the given task id
|
void |
cancelProcess()
Cancel the whole process.
|
java.lang.Object |
evaluateXPath(java.lang.String xpathExpression)
Evaluates the given XPath 1.0 expression.
|
void |
executeReport(java.lang.String id,
java.lang.String action,
java.lang.String target)
Execute a report and store the result document.
|
void |
exportDocument(java.lang.String docpath,
java.lang.String filepath)
Copy a document form process folder to the file system.
|
void |
finishActivity(java.lang.String label)
Finish a task, an andpar, orpar, or a parfor.
|
Page |
finishIf(javax.servlet.http.HttpServletRequest req)
Called by manual if after user has selected the path.
|
void |
fourEyesPrinciple(java.lang.String steplabel)
Check, if the current agent is not the agent of the step referenced by steplabel.
|
java.lang.Object |
getFormFieldValue(java.lang.String formfield)
Returns the value of a formfield.
|
java.lang.Object |
getPreviousAgent(java.lang.String steplabel,
java.lang.String defaultId)
Get the agent of a previous step (identified by its label).
|
void |
httpGet(java.lang.String urlstr,
java.lang.String returnfield)
Make a get request to a HTTP URL.
|
void |
increasePriority(java.lang.String offset)
Increase the priority with an offset.
|
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 |
nop()
Use as system step dummy, does nothing.
|
void |
parforJoin(java.lang.String n,
java.lang.String mode)
Expression in end parfor for implementing generalized parfor join.
|
boolean |
randomTrue(java.lang.String percent)
Returns true randomly.
|
void |
sendMessage(java.lang.String templateid)
Send a message using a pre-defined message template.
|
void |
setAgentFromField(java.lang.String formfield)
Set the current agent from a form field.
|
void |
setDuedateFromField(java.lang.String formfield)
Set the duedate of the current task to the value of the given form field.
|
void |
setFieldToAgent(java.lang.String formfield)
Set a form field to the current user.
|
void |
setFieldToCurrentDate(java.lang.String formfield)
Set a form field to the current date.
|
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 specified value.
|
boolean |
setOUFromField(java.lang.String formfield,
java.lang.String forProcess)
Set the org-unit of the current activity and optionally the process (parent) of the activity from a form field.
|
void |
setProcessDuedateFromField(java.lang.String formfield)
Set the duedate of the current process instance to the value of the given form field.
|
void |
startProcess(java.lang.String id,
java.lang.String orgUnit,
java.lang.String form1,
java.lang.String form2)
Start a process.
|
void |
suspend(java.lang.String days)
Suspend the current activity instance.
|
boolean |
unlock(java.lang.String name)
Removes the lock.
|
void |
untake()
Untake the task.
|
public boolean lock(java.lang.String name) throws java.lang.Exception
name
- name of the lockjava.lang.Exception
public boolean unlock(java.lang.String name) throws java.lang.Exception
name
- name of the lockjava.lang.Exception
public void cancelActivity(java.lang.String name)
name
- the id of a taskjava.lang.Exception
public void cancelProcess()
java.lang.Exception
public void autoTake() throws java.lang.Exception
java.lang.Exception
public boolean log(java.lang.String message, java.lang.String level)
message
- the messagelevel
- the log level: error, warn, info, debug, tracetrue
public void setFieldToAgent(java.lang.String formfield)
formfield
- the form field: formid "." fieldamepublic void setFieldToOU(java.lang.String formfield)
formfield
- the form field: formid "." fieldamepublic void setFieldToCurrentDate(java.lang.String formfield)
formfield
- the form field: formid "." fieldamepublic java.lang.Object getFormFieldValue(java.lang.String formfield)
formfield
- in the syntax formid "." fieldnamepublic void setFieldToValue(java.lang.String formfield, java.lang.String value) throws java.lang.Exception
formfield
- the form field: formid "." fieldamejava.lang.Exception
public boolean isStartAgent(java.lang.String formfield)
formfield
- the form field in syntax: formid "." fieldamepublic boolean isActive(java.lang.String task)
task
- the id of a task objectpublic void join(java.lang.String n, java.lang.String mode)
n
- number of branches that must be completedmode
- either cancel or none. every other value is taken as nonepublic void parforJoin(java.lang.String n, java.lang.String mode)
n
- number of branches that must be completedmode
- either cancel or none. every other value is taken as nonepublic void finishActivity(java.lang.String label)
label
- the label of a steppublic void setAgentFromField(java.lang.String formfield)
formfield
- the form field: formid "." fieldamepublic boolean isTrue()
public boolean isFalse()
public void nop()
public boolean manualIf()
public Page finishIf(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
java.lang.Exception
public java.lang.Object evaluateXPath(java.lang.String xpathExpression)
xpathExpression
- public void increasePriority(java.lang.String offset)
public void untake()
public void setDuedateFromField(java.lang.String formfield) throws java.lang.Exception
java.lang.Exception
public void setProcessDuedateFromField(java.lang.String formfield) throws java.lang.Exception
java.lang.Exception
public void fourEyesPrinciple(java.lang.String steplabel)
public boolean setOUFromField(java.lang.String formfield, java.lang.String forProcess)
formfield
- the form field: formid "." fieldame containing an org-unitforProcess
- if value is true the org-unit of the parent of the activity-instance is also set to the given org-unitpublic boolean randomTrue(java.lang.String percent)
factor
- either an integer number giving the percentage of true results or the name of a configuration
parameter defining the percentage.public void sendMessage(java.lang.String templateid) throws java.lang.Exception
templateid
- the id of the message templatejava.lang.Exception
public java.lang.Object getPreviousAgent(java.lang.String steplabel, java.lang.String defaultId)
steplabel
- label of a step in the processdefaultId
- role or user idpublic void httpGet(java.lang.String urlstr, java.lang.String returnfield) throws java.io.IOException
urlstr
- use substitutions like inreturnfield
- a form field to write the return valuejava.io.IOException
public void addSubform(java.lang.String form, java.lang.String id) throws java.lang.Exception
form
- id of the main formid
- id of the subform relation (parsed to an integer)java.lang.Exception
public void suspend(java.lang.String days)
public void executeReport(java.lang.String id, java.lang.String action, java.lang.String target) throws java.lang.Exception
id
- id of reportaction
- email, dms or filetarget
- message template, dms folder, or pathjava.lang.Exception
public void startProcess(java.lang.String id, java.lang.String orgUnit, java.lang.String form1, java.lang.String form2)
id
- the id of the process to startorgUnit
- the org-unit of the processform1
- a comma separated list of form-fields of the current process: the values are copied to the respective fields in form2form2
- a comma separated list of formfields of the new processpublic void exportDocument(java.lang.String docpath, java.lang.String filepath) throws java.lang.Exception
docpath
- path to a document of the processfilepath
- path in filesystem (absolute or relative to ep directory).java.lang.Exception
public void addDocument(java.lang.String origin, java.lang.String filepath, java.lang.String docpath) throws java.lang.Exception
origin
- dms or filefilepath
- path in filesystem or dms, see DMS.getDMSObject(String)
for syntax of pathdocpath
- path to the documentjava.lang.Exception
public void addFolder(java.lang.String name) throws java.lang.Exception
name
- name of the folderjava.lang.Exception
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.