Package org.openbravo.scheduling
Class GroupInfo
- java.lang.Object
-
- org.openbravo.scheduling.GroupInfo
-
public class GroupInfo extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
END
static String
processGroupId
String constant id for the Process Group process.
-
Constructor Summary
Constructors Constructor Description GroupInfo(ProcessGroup group, ProcessRequest request, ProcessRun processRun, List<ProcessGroupList> groupList, boolean stopWhenFails, VariablesSecureApp vars, ConnectionProvider conn)
Creates a new GroupInfo object with the given parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
executeNextProcess()
Execute the next process of the grouplong
getDuration()
Returns the duration of the groupProcessGroup
getGroup()
Returns the Process GroupString
getLog()
Returns the log of the group, this method should be call at the end of all process executionsProcessRun
getProcessRun()
Returns the Process Run of the groupProcessRequest
getRequest()
Returns the Process Request of the groupString
getStatus()
Returns the status of the groupvoid
logProcess(String result)
Log the result of a process in the process group log
-
-
-
Field Detail
-
processGroupId
public static final String processGroupId
String constant id for the Process Group process.- See Also:
- Constant Field Values
-
END
public static final String END
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GroupInfo
public GroupInfo(ProcessGroup group, ProcessRequest request, ProcessRun processRun, List<ProcessGroupList> groupList, boolean stopWhenFails, VariablesSecureApp vars, ConnectionProvider conn)
Creates a new GroupInfo object with the given parameters- Parameters:
group
- the process grouprequest
- the process request of the process groupprocessRun
- the process run of the process request of the process groupgroupList
- the list of processes that are part of the groupstopWhenFails
- if true the process group will stop after a process failsvars
- clients security/application context variablesconn
- connection provider
-
-
Method Detail
-
getGroup
public ProcessGroup getGroup()
Returns the Process Group- Returns:
- ProcessGroup
-
getRequest
public ProcessRequest getRequest()
Returns the Process Request of the group- Returns:
- ProcessRequest of the group
-
getProcessRun
public ProcessRun getProcessRun()
Returns the Process Run of the group- Returns:
- ProcessRun of the group
-
getStatus
public String getStatus()
Returns the status of the group- Returns:
- String with the status of the group
-
getLog
public String getLog()
Returns the log of the group, this method should be call at the end of all process executions- Returns:
- String with the log of the group
-
getDuration
public long getDuration()
Returns the duration of the group- Returns:
- Long with the duration in milliseconds
-
executeNextProcess
public String executeNextProcess() throws org.quartz.SchedulerException, javax.servlet.ServletException
Execute the next process of the group- Returns:
- String with the process id executed or END if there is no more processes to execute
- Throws:
org.quartz.SchedulerException
javax.servlet.ServletException
-
logProcess
public void logProcess(String result)
Log the result of a process in the process group log- Parameters:
result
- Process.SUCCESS or Process.ERROR
-
-