OBEROn SDK

com.oberon.ooql.sdk
Class ProcessStep

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.ProcessStep
All Implemented Interfaces:
java.io.Serializable

public class ProcessStep
extends OBBase

Represents a Process step.

Version:
5.0
See Also:
Serialized Form

Field Summary
 java.lang.String href
           
 int iOldStatus
           
 int iProcessID
           
 java.lang.String label
           
 java.lang.String logMessage
           
 java.lang.String mail_body
           
 java.lang.String mail_subject
           
static int STATUS_COMPLETED
          The step has finished its execution
static int STATUS_ERROR
          The step has caused an error
static int STATUS_EXECUTION
          The step is running
static int STATUS_EXPIRED
          The step is expired
static int STATUS_QUEUED
          The step is queued
static int STATUS_SKIPPED
          The step is skipped
static int STATUS_SUSPENDED
          The step is suspended
static int STATUS_TERMINATED
          The step is terminated
static int STATUS_WAIT
          The step is waiting for user execution
 int step_type
           
 java.util.Vector<java.lang.Object> vAddObjects
           
 java.util.Vector<java.lang.Object> vDelObjects
           
 
Constructor Summary
ProcessStep()
           
ProcessStep(java.lang.String name)
           
 
Method Summary
 void addExecuteAccess(java.lang.String actorType, java.lang.String actorName)
          Add access right to execute this Step to an actor
 void addObject(java.lang.String objectID)
          Add a single ObjectObj to this Process Step
 void addObject(java.lang.String objectClass, java.lang.String objectName, java.lang.String objectRevision)
          Add a single ObjectObj to this Process Step
 void addRecipient(java.lang.String type, java.lang.String actorType, java.lang.String actorName)
          Add a User/Team/Assignment to the recipient list
static boolean checkStatusTransition(int oldstatus, int newstatus)
          Check if the status transition is valid
 void clearParameters()
          Remove all Step local Parameters.
 java.lang.String convertChoices(java.util.BitSet choices)
          Convert user choices from BitSet format to String format
 java.util.BitSet convertChoices(java.util.Vector<java.lang.String> choices)
          Convert user choices from BitSet format to String format
 org.jdom.Element destToXML(java.lang.String sToCc, Framework framework)
          Return the Notification object addresses as XML element tree
 void fromXML(org.jdom.Element rootElement)
          Load the Step object from XML element tree
 java.lang.String getEndDateTime()
          Get the Process End Date/Time
 java.util.Vector<java.lang.String> getExecuteAccess(Framework framework)
          Return the list of execute access rights for this Step.
 long getExecutionPerc()
          Get the Step Execution Percentage.
 java.lang.String getExpireDateTime()
          Get the Process Expiration Date/Time
 java.lang.String getHolder()
          Get the Step's holder.
 java.lang.String getHRef()
          Get the User link HRef
 java.lang.String getLabel()
          Get the User link label
 java.lang.String getMailBody()
          Get the Mail Body for notification steps
 java.lang.String getMailSubject()
          Get the Mail Subject for notification steps
 java.lang.String getName()
          Get the ObjectValidation name
 java.util.Vector<java.lang.String> getObjects(Framework framework)
          Get the associated ObjectObjs.
 int getOldStatus()
          Get the Step previous status
 java.util.Hashtable<java.lang.String,java.lang.String> getParameters()
          Get the Step local Parameters.
 Process getProcess(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          Get the related Process
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          Get a property for this Process-Step object by its OOQL identifier
 java.util.Vector<java.lang.String> getRecipients(Framework framework)
          Return the recipient list
 java.lang.String getRecipientToString(java.lang.String type, java.lang.String token, Framework framework)
          Return the recipient list as a string
 java.lang.String getSaveCommand()
          Return the OOQL command to update this Step Process object with the modified properties.
 java.lang.String getStartDateTime()
          Get the Process Start Date/Time
 int getStatus()
          Get the Step status
 java.lang.String getStatusAsString()
          Get the Step status in OOQL format
static java.lang.String getStatusAsString(int status)
          Convert the Step type in OOQL format
static int getStatusFromString(java.lang.String stepStatus)
          Convert Step status from OOQL format
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          Return a Vector of administrative object names extracted by using an OOQL selector
 int getType()
          Get the Step type
 java.lang.String getUserChoices(java.lang.String userName, Framework framework)
          Return the choice made by a given user
 org.jdom.Element getXMLExecuteList(Framework framework)
          Return the Execute Access List as XML element tree
 boolean hasExecuteAccess(User user, Framework framework)
          Check if a User has access to execute this Process Step.
 void removeExecuteAccess(java.lang.String actorType, java.lang.String actorName)
          Remove the actor access right to execute this Step
 void removeObject(java.lang.String objectID)
          Remove a single ObjectObj from this Process Step
 void removeObject(java.lang.String objectClass, java.lang.String objectName, java.lang.String objectRevision)
          Remove a single ObjectObj from this Process Step
 void removeParameter(java.lang.String parameter)
          Remove a parameter from the Step local Parameters.
 void removeRecipient(java.lang.String type, java.lang.String actorType, java.lang.String actorName)
          Remove a User/Team/Assignment from the recipient list
 void setEndDateTime(java.lang.String datetime)
          Set the Process End Date/Time
 void setExecutionPerc(int perc)
          Set the Step Execution Percentage.
 void setExpireDateTime(java.lang.String datetime)
          Set the Process Expiration Date/Time
 void setHolder(java.lang.String userName)
          Set the Step's holder
 void setName(java.lang.String name)
          Set the ObjectValidation name [INTERNAL USAGE]
 void setParameter(java.lang.String parameter, java.lang.String value)
          Set a Step local Parameter.
 void setParameters(java.util.Hashtable<java.lang.String,java.lang.String> parameters)
          Set the Step execution local Parameters.
 void setProcess(Process process)
          Link the Step with the related Process
 void setStartDateTime(java.lang.String datetime)
          Set the Process Start Date/Time
 void setStatus(int newstatus)
          Set the Step status
 java.lang.String toString(Framework framework)
          Return the Step object basic properties as a single String
 org.jdom.Element toXML(Framework framework)
          Return the Step object properties as XML element tree
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iOldStatus

public int iOldStatus

iProcessID

public int iProcessID

step_type

public int step_type

logMessage

public java.lang.String logMessage

href

public java.lang.String href

label

public java.lang.String label

mail_subject

public java.lang.String mail_subject

mail_body

public java.lang.String mail_body

vAddObjects

public java.util.Vector<java.lang.Object> vAddObjects

vDelObjects

public java.util.Vector<java.lang.Object> vDelObjects

STATUS_QUEUED

public static final int STATUS_QUEUED
The step is queued

See Also:
Constant Field Values

STATUS_WAIT

public static final int STATUS_WAIT
The step is waiting for user execution

See Also:
Constant Field Values

STATUS_EXECUTION

public static final int STATUS_EXECUTION
The step is running

See Also:
Constant Field Values

STATUS_COMPLETED

public static final int STATUS_COMPLETED
The step has finished its execution

See Also:
Constant Field Values

STATUS_ERROR

public static final int STATUS_ERROR
The step has caused an error

See Also:
Constant Field Values

STATUS_EXPIRED

public static final int STATUS_EXPIRED
The step is expired

See Also:
Constant Field Values

STATUS_TERMINATED

public static final int STATUS_TERMINATED
The step is terminated

See Also:
Constant Field Values

STATUS_SUSPENDED

public static final int STATUS_SUSPENDED
The step is suspended

See Also:
Constant Field Values

STATUS_SKIPPED

public static final int STATUS_SKIPPED
The step is skipped

See Also:
Constant Field Values
Constructor Detail

ProcessStep

public ProcessStep()

ProcessStep

public ProcessStep(java.lang.String name)
            throws OberonException
Parameters:
name - the name of the administrative object
Throws:
OberonException - if the name contains invalid characters
Method Detail

setProcess

public void setProcess(Process process)
Link the Step with the related Process


getProcess

public Process getProcess(Framework framework,
                          java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
                   throws OberonException
Get the related Process

Throws:
OberonException

setName

public void setName(java.lang.String name)
Set the ObjectValidation name [INTERNAL USAGE]


getName

public java.lang.String getName()
Get the ObjectValidation name

Specified by:
getName in class OBBase

setStatus

public void setStatus(int newstatus)
               throws OberonException
Set the Step status

Parameters:
newstatus - the Step status
Throws:
OberonException

getStatus

public int getStatus()
Get the Step status


getOldStatus

public int getOldStatus()
Get the Step previous status


getStatusAsString

public static java.lang.String getStatusAsString(int status)
Convert the Step type in OOQL format


checkStatusTransition

public static boolean checkStatusTransition(int oldstatus,
                                            int newstatus)
Check if the status transition is valid


getStatusAsString

public java.lang.String getStatusAsString()
Get the Step status in OOQL format


getStatusFromString

public static int getStatusFromString(java.lang.String stepStatus)
Convert Step status from OOQL format

Returns:
the Step status

setStartDateTime

public void setStartDateTime(java.lang.String datetime)
Set the Process Start Date/Time


getStartDateTime

public java.lang.String getStartDateTime()
Get the Process Start Date/Time

Returns:
the start date/time

setEndDateTime

public void setEndDateTime(java.lang.String datetime)
Set the Process End Date/Time


getEndDateTime

public java.lang.String getEndDateTime()
Get the Process End Date/Time

Returns:
the end date/time

setExpireDateTime

public void setExpireDateTime(java.lang.String datetime)
Set the Process Expiration Date/Time


getExpireDateTime

public java.lang.String getExpireDateTime()
Get the Process Expiration Date/Time

Returns:
the expire date/time

getType

public int getType()
Get the Step type


getLabel

public java.lang.String getLabel()
Get the User link label

Returns:
the label

getHRef

public java.lang.String getHRef()
Get the User link HRef

Returns:
the href url

getMailSubject

public java.lang.String getMailSubject()
Get the Mail Subject for notification steps

Returns:
the mail subject

getMailBody

public java.lang.String getMailBody()
Get the Mail Body for notification steps

Returns:
the mail body

setExecutionPerc

public void setExecutionPerc(int perc)
Set the Step Execution Percentage.


getExecutionPerc

public long getExecutionPerc()
Get the Step Execution Percentage.


setHolder

public void setHolder(java.lang.String userName)
Set the Step's holder

Parameters:
userName - the holder User name
Since:
2.1

getHolder

public java.lang.String getHolder()
Get the Step's holder.

Returns:
the holder User name
Since:
2.1

addExecuteAccess

public void addExecuteAccess(java.lang.String actorType,
                             java.lang.String actorName)
Add access right to execute this Step to an actor

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name

removeExecuteAccess

public void removeExecuteAccess(java.lang.String actorType,
                                java.lang.String actorName)
Remove the actor access right to execute this Step

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name

getExecuteAccess

public java.util.Vector<java.lang.String> getExecuteAccess(Framework framework)
Return the list of execute access rights for this Step.

Returns:
Vector of access rights formatted as actorType|actorName
See Also:
addExecuteAccess(String, String)

hasExecuteAccess

public boolean hasExecuteAccess(User user,
                                Framework framework)
Check if a User has access to execute this Process Step.


addRecipient

public void addRecipient(java.lang.String type,
                         java.lang.String actorType,
                         java.lang.String actorName)
Add a User/Team/Assignment to the recipient list

Parameters:
type - the recipient type ( Mail.TO , Mail.CC , Mail.BCC )
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name

removeRecipient

public void removeRecipient(java.lang.String type,
                            java.lang.String actorType,
                            java.lang.String actorName)
Remove a User/Team/Assignment from the recipient list

Parameters:
type - the recipient type ( Mail.TO , Mail.CC , Mail.BCC )
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name

getRecipients

public java.util.Vector<java.lang.String> getRecipients(Framework framework)
Return the recipient list

Returns:
Vector of recipients formatted as type|actorType|actorName
See Also:
addRecipient(String, String, String)

getRecipientToString

public java.lang.String getRecipientToString(java.lang.String type,
                                             java.lang.String token,
                                             Framework framework)
Return the recipient list as a string

Parameters:
type - the recipient type ( Mail.TO , Mail.CC , Mail.BCC )
token - the separator token

addObject

public void addObject(java.lang.String objectID)
Add a single ObjectObj to this Process Step

Parameters:
objectID - the ObjectObj ID

addObject

public void addObject(java.lang.String objectClass,
                      java.lang.String objectName,
                      java.lang.String objectRevision)
Add a single ObjectObj to this Process Step

Parameters:
objectClass - the ObjectObj's Class name
objectName - the ObjectObj's name
objectRevision - the ObjectObj's revision

removeObject

public void removeObject(java.lang.String objectID)
Remove a single ObjectObj from this Process Step

Parameters:
objectID - the ObjectObj ID

removeObject

public void removeObject(java.lang.String objectClass,
                         java.lang.String objectName,
                         java.lang.String objectRevision)
Remove a single ObjectObj from this Process Step

Parameters:
objectClass - the ObjectObj's Class name
objectName - the ObjectObj's name
objectRevision - the ObjectObj's revision

getObjects

public java.util.Vector<java.lang.String> getObjects(Framework framework)
Get the associated ObjectObjs.

Parameters:
framework - the current framework
Returns:
a Vector of { ObjectObj } IDs
Since:
2.2

setParameters

public void setParameters(java.util.Hashtable<java.lang.String,java.lang.String> parameters)
Set the Step execution local Parameters.

Parameters:
parameters - set of parameters to put/change into the parameter table
Since:
2.2_01

setParameter

public void setParameter(java.lang.String parameter,
                         java.lang.String value)
Set a Step local Parameter.

Parameters:
parameter - the parameter to set
value - the parameter value
Since:
2.2_01

removeParameter

public void removeParameter(java.lang.String parameter)
Remove a parameter from the Step local Parameters.

Parameters:
parameter - the parameter to remove
Since:
2.2_01

clearParameters

public void clearParameters()
Remove all Step local Parameters.

Since:
2.2_01

getParameters

public java.util.Hashtable<java.lang.String,java.lang.String> getParameters()
Get the Step local Parameters.

Returns:
Hashtable where the parameter names are the keys

convertChoices

public java.lang.String convertChoices(java.util.BitSet choices)
Convert user choices from BitSet format to String format

Parameters:
choices - flags checked by user
Returns:
string with list of transition names separated by ";"

convertChoices

public java.util.BitSet convertChoices(java.util.Vector<java.lang.String> choices)
Convert user choices from BitSet format to String format

Parameters:
choices - Vector with transition names checked by user

getUserChoices

public java.lang.String getUserChoices(java.lang.String userName,
                                       Framework framework)
Return the choice made by a given user


getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
Get a property for this Process-Step object by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: status , startdate ...)
filterArgs - extra arguments used to compute properties
token - separator token for complex properties
framework - the current framework
Returns:
the property value

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector

Specified by:
getTargetNames in class OBBase
Parameters:
composedName - OOQL property identifier/name (example: wfstep )
filterArgs - extra arguments used to compute properties
framework - the current framework
Returns:
a Vector of target names, used to extract their (sub)properties values

toString

public java.lang.String toString(Framework framework)
Return the Step object basic properties as a single String


getXMLExecuteList

public org.jdom.Element getXMLExecuteList(Framework framework)
Return the Execute Access List as XML element tree


destToXML

public org.jdom.Element destToXML(java.lang.String sToCc,
                                  Framework framework)
Return the Notification object addresses as XML element tree

Parameters:
sToCc - can be TO, CC or BCC

toXML

public org.jdom.Element toXML(Framework framework)
Return the Step object properties as XML element tree

Parameters:
framework - the current framework

fromXML

public void fromXML(org.jdom.Element rootElement)
Load the Step object from XML element tree


getSaveCommand

public java.lang.String getSaveCommand()
Return the OOQL command to update this Step Process object with the modified properties.

Since:
4.0

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.