public class WorkFlowService extends AppService implements WorkFlowServiceRemote
LOGGERNAME_WORKFLOWAPPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGERappenderPrefix, 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, verifyUserequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckSecurity, getCriteria, getCurrentState, getLiveObjCount, getMboSet, getName, getSchemaOwner, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, verifyUser, verifyUserisAppService, isSingletonService, restartpublic WorkFlowService()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic WorkFlowService(MXServer mxServer) throws java.rmi.RemoteException
srvEnv - -- the "Server Environment" this Service is being
created in.java.rmi.RemoteExceptionpublic void init()
init in interface Serviceinit in class AppServiceService.init()public void destroy()
Servicedestroy in interface Servicedestroy in class AppServiceServicepublic WFInstanceSetRemote getActiveInstances(MboRemote mbo) throws MXException, java.rmi.RemoteException
getActiveInstances in interface WorkFlowServiceRemotembo - The mbo to return instances for.MXExceptionjava.rmi.RemoteExceptiongetActiveInstances(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.RemoteExceptionMXExceptionpublic 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.MXExceptionjava.rmi.RemoteExceptionpublic 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 WorkFlowServiceRemoteprocessName - 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.MXExceptionjava.rmi.RemoteExceptionSimilar to this.public MXLogger getWFLogger() throws MXException, java.rmi.RemoteException
getWFLogger in interface WorkFlowServiceRemoteMXExceptionjava.rmi.RemoteExceptiongetWFLogger()public MXLogger getWFLogger(Mbo mbo) throws MXException, java.rmi.RemoteException
getWFLogger in interface WorkFlowServiceRemoteMbo - the business object who you want the logger for.MXExceptionjava.rmi.RemoteExceptiongetWFLogger(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 WorkFlowServiceRemoteassign - 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.MXExceptionjava.rmi.RemoteExceptionSimilar to this.public boolean isActiveProcess(java.lang.String processName,
java.lang.String mboName,
UserInfo ui)
throws MXException,
java.rmi.RemoteException
isActiveProcess in interface WorkFlowServiceRemoteprocessName - 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.MXExceptionjava.rmi.RemoteExceptionpsdi.workflow.WorkFlowService#isActiveProcess(String, String)public java.lang.String getDefaultAppForObject(UserInfo ui, java.lang.String objectName) throws MXException, java.rmi.RemoteException
getDefaultAppForObject in interface WorkFlowServiceRemoteui - Used to get data from the database.objectName - Name of the ObjectMXExceptionjava.rmi.RemoteExceptiongetDefaultAppForObject(UserInfo,String)