Class ProcessController
java.lang.Object
com.appiancorp.suiteapi.process.test.Controller
com.appiancorp.suiteapi.process.test.ProcessController
- Direct Known Subclasses:
TaskController
ProcessController provides simplified access for controlling a process.
This allows simplified access to starting and concluding a process under program control.
As this extends Controller, all Controller capabilities are available.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.appiancorp.suiteapi.process.test.Controller
Controller.ControllerException, Controller.LogElement, Controller.LogLevel
-
Field Summary
Fields inherited from class com.appiancorp.suiteapi.process.test.Controller
defaultDuration, defaultTimeUnit, log, LOG, logLevel, logToLogger, performance, sc
-
Constructor Summary
ConstructorDescriptionProcessController
(ServiceContext sc, Long targetProcessId) Construct a ProcessController for the given ServiceContext. -
Method Summary
Modifier and TypeMethodDescriptionint
Conclude process will return whenever the target process is no longer active.int
concludeProcess
(long duration, TimeUnit timeUnit) Conclude process will return whenever the target process is no longer active.startProcess
(Long processModelId, ProcessVariable[] pvs) Start the given ProcessModel using the given ProcessVariables.Methods inherited from class com.appiancorp.suiteapi.process.test.Controller
clearLog, enableLogToLogger, enablePerformanceLogging, getLog, getPerformanceSummary, log, setLogLevel, setTimeout, yieldWithLog
-
Field Details
-
targetProcessId
-
-
Constructor Details
-
ProcessController
Construct a ProcessController for the given ServiceContext.- Parameters:
sc
-activityId
-
-
-
Method Details
-
startProcess
public Long startProcess(Long processModelId, ProcessVariable[] pvs) throws InvalidProcessModelException, PrivilegeException, InvalidStateException, StorageLimitException, InvalidUserException, IllegalArgumentException, Exception Start the given ProcessModel using the given ProcessVariables.- Parameters:
processModelId
-pvs
-- Returns:
- processId
- Throws:
Exception
IllegalArgumentException
InvalidUserException
StorageLimitException
InvalidStateException
PrivilegeException
InvalidProcessModelException
-
concludeProcess
public int concludeProcess() throws InvalidProcessException, ArchivedProcessException, PrivilegeException, TimeoutExceptionConclude process will return whenever the target process is no longer active. This may be completed, an error status, etc. -- anything other than STATE_ACTIVE. This method will timeout after this Controller's default timeout duration.- Returns:
- process status; see ProcessSummary STATE_x constants
- Throws:
TimeoutException
PrivilegeException
ArchivedProcessException
InvalidProcessException
-
concludeProcess
public int concludeProcess(long duration, TimeUnit timeUnit) throws InvalidProcessException, ArchivedProcessException, PrivilegeException, TimeoutException Conclude process will return whenever the target process is no longer active. This may be completed, an error status, etc. -- anything other than STATE_ACTIVE. This method will timeout after the given timeout duration.- Parameters:
duration
-timeUnit
-- Returns:
- process status
- Throws:
PrivilegeException
ArchivedProcessException
InvalidProcessException
TimeoutException
-