public class WorkFlowService extends AppService implements WorkFlowServiceRemote
LOGGERNAME_WORKFLOW
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
WorkFlowService()
Constructor
|
WorkFlowService(MXServer mxServer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
completeAssignment(WFAssignmentRemote assign,
java.lang.String memo,
boolean accepted)
Completes a workflow assignment in the background.
|
void |
destroy()
Release system resources.
|
boolean |
evaluateCondition(Mbo onBehalfOf,
java.lang.String customclass,
java.lang.String condition,
MboRemote mbo)
Evaulates a condition.
|
WFInstanceSetRemote |
getActiveInstances(MboRemote mbo)
Returns all active instances on a Mbo.
|
java.lang.String |
getDefaultAppForObject(UserInfo ui,
java.lang.String objectName)
Find the name of an application that has as it's main object the value given.
|
MXLogger |
getWFLogger()
Returns a logger to log workflow messages
|
MXLogger |
getWFLogger(Mbo mbo)
Returns a logger to log workflow messages related to a business object.
|
void |
init()
Start up the AutoInit cache.
|
void |
initiateWorkflow(java.lang.String processName,
MboRemote target)
Initiates a workflow process on the target Mbo.
|
boolean |
isActiveProcess(java.lang.String processName,
java.lang.String mboName,
UserInfo ui)
Test that an active process exists with the given name.
|
void |
validateCondition(MboRemote onBehalfOf,
java.lang.String customAttr,
java.lang.String condAttr)
Checks the validity of the condition or condition class.
|
checkSecurity, configure, freeDBConnection, freeMboSet, getCriteria, getCurrentState, getDBConnection, getLiveObjCount, getLoad, getMaximoDD, getMaxVar, getMboSet, getMXServer, getName, getProfile, getProxy, getSchemaOwner, getServiceInfo, getServiceLogger, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, initCriteriaList, isAppService, isRunning, isSingletonService, restart, setProxy, setRunning, setURL, verifyUser, verifyUser
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSecurity, getCriteria, getCurrentState, getLiveObjCount, getMboSet, getName, getSchemaOwner, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, verifyUser, verifyUser
isAppService, isSingletonService, restart
public WorkFlowService() throws java.rmi.RemoteException
java.rmi.RemoteException
public WorkFlowService(MXServer mxServer) throws java.rmi.RemoteException
srvEnv
- -- the "Server Environment" this Service is being
created in.java.rmi.RemoteException
public void init()
init
in interface Service
init
in class AppService
Service.init()
public void destroy()
Service
destroy
in interface Service
destroy
in class AppService
Service
public WFInstanceSetRemote getActiveInstances(MboRemote mbo) throws MXException, java.rmi.RemoteException
getActiveInstances
in interface WorkFlowServiceRemote
mbo
- The mbo to return instances for.MXException
java.rmi.RemoteException
getActiveInstances(MboRemote)
public void validateCondition(MboRemote onBehalfOf, java.lang.String customAttr, java.lang.String condAttr) throws java.rmi.RemoteException, MXException
onBehalfOf
- The Mbo performing this validation test.customclass
- The custom class name used for the condition.condition
- The condition.java.rmi.RemoteException
MXException
public boolean evaluateCondition(Mbo onBehalfOf, java.lang.String customclass, java.lang.String condition, MboRemote mbo) throws MXException, java.rmi.RemoteException
onBehalfOf
- The Mbo performing this evaluation. Need for error logging.customclass
- If specified, an instance of the class is created and evaluatedcondition
- The condition.mbo
- This mbo is passed to the customclass or is the source of values for the condition.MXException
java.rmi.RemoteException
public void initiateWorkflow(java.lang.String processName, MboRemote target) throws MXException, java.rmi.RemoteException
This method makes use of the InitiateWorkflow virtual set.
If the process requires user interaction, like a manual input, then an error will be logged and
an exception thrown.
If the process name is not valid or any other MXException, then an error will be logged and
an exception thrown.
initiateWorkflow
in interface WorkFlowServiceRemote
processName
- The name of the process to initiate.target
- The Mbo to initiate workflow on.MXApplicationException
- Thrown with "workflow", "BgInitFailure" if the workflow
can't be initiated in the background. The nested exception will have additional details.MXException
java.rmi.RemoteException
Similar to this.
public MXLogger getWFLogger() throws MXException, java.rmi.RemoteException
getWFLogger
in interface WorkFlowServiceRemote
MXException
java.rmi.RemoteException
getWFLogger()
public MXLogger getWFLogger(Mbo mbo) throws MXException, java.rmi.RemoteException
getWFLogger
in interface WorkFlowServiceRemote
Mbo
- the business object who you want the logger for.MXException
java.rmi.RemoteException
getWFLogger(Mbo mbo)
public void completeAssignment(WFAssignmentRemote assign, java.lang.String memo, boolean accepted) throws MXException, java.rmi.RemoteException
If the process requires user interaction, like a manual input, then an error will be logged and
an exception thrown.
If the process name is not valid or any other MXException, then an error will be logged and
an exception thrown.
completeAssignment
in interface WorkFlowServiceRemote
assign
- The assignment to complete.memo
- The memo for the assignment completeaccepted
- Determines whether the accept or reject action is used.MXApplicationException
- Thrown with "workflow", "BgCompFailure" if the workflow
can't be initiated in the background. The nested exception will have additional details.MXException
java.rmi.RemoteException
Similar to this.
public boolean isActiveProcess(java.lang.String processName, java.lang.String mboName, UserInfo ui) throws MXException, java.rmi.RemoteException
isActiveProcess
in interface WorkFlowServiceRemote
processName
- Name of the process to check formbo
- The type of mbo is the type of process that should be activeui
- Used to get data from the database.MXException
java.rmi.RemoteException
psdi.workflow.WorkFlowService#isActiveProcess(String, String)
public java.lang.String getDefaultAppForObject(UserInfo ui, java.lang.String objectName) throws MXException, java.rmi.RemoteException
getDefaultAppForObject
in interface WorkFlowServiceRemote
ui
- Used to get data from the database.objectName
- Name of the ObjectMXException
java.rmi.RemoteException
getDefaultAppForObject(UserInfo,String)