Interface ITaskFormFlowService
- All Superinterfaces:
IComponent
,IInitializable
,ITaskComponent
Service to handle form flow between tasks in the process model. The basic usage is:
1. Create wait object using
2. Complete a task
3. Wait for new result from form flow using
4. Obtain result from
The new task being queued will need to call notify in its Queued event
To obtain service implementation instance use
1. Create wait object using
waitPrepare(String)
call for some unique correlation ID2. Complete a task
3. Wait for new result from form flow using
wait(TaskFlowObject, int)
.4. Obtain result from
TaskFlowObject
The new task being queued will need to call notify in its Queued event
notify(String, String, boolean)
for
the same correlation ID and pass out a result. The result may be anything, for typical form flow implementation the result
would be ID of a new task queued
To obtain service implementation instance use
ITaskFormFlowService.Instance.get()
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Returns implementation instance for FormFlow service -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies anyone waiting on the specific correlation ID.void
wait
(TaskFlowObject flow, int timeout) Waits for a notification for a given wait object.waitPrepare
(String correlationID) Prepares and returns wait object based on the unique correlation ID.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
Method Details
-
waitPrepare
Prepares and returns wait object based on the unique correlation ID. This is not a blocking call e.g. it does not wait for anything This needs to be invoked before completing a task or starting a new process- Parameters:
correlationID
- correlation ID value to wait for. Must be unique- Returns:
- wait object
-
wait
Waits for a notification for a given wait object. This is a blocking call which waits for notification for a correlation ID or for timeout. Use TaskFlowObject.isNotified() property to check if wait object was successfully notified or not. Use TaskFlowObject.getResult() to obtain result of the notify e.g. taskID or taskUrl or anything else- Parameters:
flow
- wait object obtained by waitPrepare() calltimeout
- timeout in milliseconds to wait.- Throws:
InterruptedException
-
notify
Notifies anyone waiting on the specific correlation ID. It passed a result which will be available for the waiter in the TaskFlowObject. For cluster wide notification specify localOnly = false- Parameters:
correlationID
- correlation ID to notify aboutresult
- result string to pass to waiting partylocalOnly
- whether notify whole MWS cluster. Typically this should be set to false.- Throws:
PortalException
-