Package org.compiere.server
Class WorkflowProcessor
- java.lang.Object
-
- org.compiere.server.AdempiereServer
-
- org.compiere.server.WorkflowProcessor
-
- All Implemented Interfaces:
Runnable
public class WorkflowProcessor extends AdempiereServer
Workflow Processor- Version:
- $Id: WorkflowProcessor.java,v 1.4 2006/07/30 00:53:33 jjanke Exp $
- Author:
- Jorg Janke
-
-
Field Summary
Fields Modifier and Type Field Description protected MClient
m_client
Client onfoprotected MWorkflowProcessor
m_model
The Concrete Modelprotected StringBuffer
m_summary
Last Summary-
Fields inherited from class org.compiere.server.AdempiereServer
log, m_sleepMS, m_start, p_client, p_model, p_runCount, p_startWork, p_system
-
-
Constructor Summary
Constructors Constructor Description WorkflowProcessor(MWorkflowProcessor model)
WorkflowProcessor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doWork()
Workprotected void
dynamicPriority()
Set/Increase Priority dynamicallyString
getServerInfo()
Get Server Infoprotected void
sendAlerts()
Send Alertsprotected int
sendAlertToResponsible(MWFResponsible responsible, ArrayList<Integer> list, MWFProcess process, String subject, String message, File pdf)
Send Alert To Responsibleprotected int
sendEmail(MWFActivity activity, String AD_Message, boolean toProcess, boolean toSupervisor)
Send Alert EMailprotected void
wakeup()
Continue Workflow After Sleep-
Methods inherited from class org.compiere.server.AdempiereServer
doRun, doRunNow, getCtx, getDateLastRun, getDateNextRun, getDescription, getInitialNap, getLogs, getModel, getName, getSecondsAlive, getServerID, getSleepMS, getStartTime, getStatistics, isInterrupted, isOKtoRunOnIP, isSleeping, recalculateSleepMS, run, runNow, toString
-
-
-
-
Field Detail
-
m_model
protected MWorkflowProcessor m_model
The Concrete Model
-
m_summary
protected StringBuffer m_summary
Last Summary
-
m_client
protected MClient m_client
Client onfo
-
-
Constructor Detail
-
WorkflowProcessor
public WorkflowProcessor(MWorkflowProcessor model)
WorkflowProcessor- Parameters:
model
- model
-
-
Method Detail
-
doWork
protected void doWork()
Work- Specified by:
doWork
in classAdempiereServer
-
wakeup
protected void wakeup()
Continue Workflow After Sleep
-
dynamicPriority
protected void dynamicPriority()
Set/Increase Priority dynamically
-
sendAlerts
protected void sendAlerts()
Send Alerts
-
sendEmail
protected int sendEmail(MWFActivity activity, String AD_Message, boolean toProcess, boolean toSupervisor)
Send Alert EMail- Parameters:
activity
- activityAD_Message
- messagetoProcess
- true if to process ownertoSupervisor
- true if to Supervisor- Returns:
- number of mails sent
-
sendAlertToResponsible
protected int sendAlertToResponsible(MWFResponsible responsible, ArrayList<Integer> list, MWFProcess process, String subject, String message, File pdf)
Send Alert To Responsible- Parameters:
responsible
- responsiblelist
- list of already sent usersprocess
- processsubject
- subjectmessage
- messagepdf
- optional pdf- Returns:
- number of mail sent
-
getServerInfo
public String getServerInfo()
Get Server Info- Specified by:
getServerInfo
in classAdempiereServer
- Returns:
- info
-
-