Package org.bgerp.dao.expression

# Class ProcessChangeExpressionObject

java.lang.Object
org.bgerp.dao.expression.ExpressionContextAccessingObject
org.bgerp.dao.expression.ProcessChangeExpressionObject

All Implemented Interfaces:
  `ExpressionObject`

Direct Known Subclasses:
  `ProcessChangeFunctions`

public class ProcessChangeExpressionObject extends ExpressionContextAccessingObject
Expression object for performing process related operations

- ## Field Summary

  ### Fields inherited from class org.bgerp.dao.expression.ExpressionContextAccessingObject

  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProcessChangeExpressionObject(Connection con, DynActionForm form, Process process)`
  `ProcessChangeExpressionObject(Process process, DynActionForm form, Connection con)`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addExecutors(Set<Integer> ids)`
  Add executors in the process.
  `void`
  `addExecutors(Set<Integer> groupIds, Set<Integer> userIds, int roleId)`
  Adds process executers with defined groups and roles.
  `void`
  `addGroups(Set<Integer> groupIds, int roleId)`
  Add execution groups in the process
  `void`
  `delete()`
  Delete the current process
  `void`
  `deleteExecutors(Set<Integer> ids)`
  Delete process executors
  `void`
  `deleteGroups(Set<Integer> ids)`
  Delete execution groups and related executors in the process
  `void`
  `emailNotifyExecutors(int paramId, String subject, String text)`
  Deprecated.
  `void`
  `emailNotifyUsers(Collection<Integer> userIds, int paramId, String subject, String text)`
  Deprecated.
  `void`
  `setPriority(int value)`
  Set process priority
  `void`
  `setStatus(int value)`
  Change process status
  `void`
  `setStatus(int value, String comment)`
  Change process status
  `void`
  `toContext(Map<String,Object> context)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ProcessChangeExpressionObject

    public ProcessChangeExpressionObject(Connection con, DynActionForm form, Process process)

  - ### ProcessChangeExpressionObject

    @Deprecated public ProcessChangeExpressionObject(Process process, DynActionForm form, Connection con)
    Deprecated.

- ## Method Details

  - ### toContext

    public void toContext(Map<String,Object> context)
    Specified by:
      `toContext` in interface `ExpressionObject`
    Overrides:
      `toContext` in class `ExpressionContextAccessingObject`

  - ### delete

    public void delete() throws Exception
    Delete the current process
    Throws:
      `Exception`

  - ### addGroups

    public void addGroups(Set<Integer> groupIds, int roleId) throws Exception
    Add execution groups in the process
    Parameters:
      `groupIds` - the group IDs
      `roleId` - the role ID
    Throws:
      `Exception`

  - ### deleteGroups

    public void deleteGroups(Set<Integer> ids) throws Exception
    Delete execution groups and related executors in the process
    Parameters:
      `ids` - the group IDs
    Throws:
      `Exception`

  - ### addExecutors

    public void addExecutors(Set<Integer> ids) throws BGMessageException, Exception
    Add executors in the process. Execution groups must be already set there. Any of added executors must have only one of the process execution groups.
    Parameters:
      `ids` - the executor user IDs
    Throws:
      `BGMessageException` - not any of added executors have only one of the process execution groups
      `Exception`

  - ### addExecutors

    public void addExecutors(Set<Integer> groupIds, Set<Integer> userIds, int roleId) throws Exception
    Adds process executers with defined groups and roles. Execution groups have to be already added.
    Parameters:
      `groupIds` - the group IDs, or `null` for adding to all execution groups
      `userIds` - the executor IDs to be added
      `roleId` - the role >= 0 or -1 for adding to execution groups with any role
    Throws:
      `Exception`

  - ### deleteExecutors

    public void deleteExecutors(Set<Integer> ids) throws Exception
    Delete process executors
    Parameters:
      `ids` - the executor user IDs
    Throws:
      `Exception`

  - ### setPriority

    public void setPriority(int value) throws SQLException
    Set process priority
    Parameters:
      `value` - the priority
    Throws:
      `SQLException`

  - ### setStatus

    public void setStatus(int value) throws Exception
    Change process status
    Parameters:
      `value` - the status
    Throws:
      `Exception`

  - ### setStatus

    public void setStatus(int value, String comment) throws Exception
    Change process status
    Parameters:
      `value` - the status
    Throws:
      `Exception`

  - ### emailNotifyExecutors

    @Deprecated public void emailNotifyExecutors(int paramId, String subject, String text) throws Exception
    Deprecated.
    Throws:
      `Exception`

  - ### emailNotifyUsers

    @Deprecated public void emailNotifyUsers(Collection<Integer> userIds, int paramId, String subject, String text) throws Exception
    Deprecated.
    Throws:
      `Exception`