Completion Strategy Factory
The completion
strategy factory provides access to system-supplied and
user-defined completion strategies.
Completion Strategy
A completion strategy
provides a pluggable means for determining when an activity should be
marked complete. OBE comes with two such strategies, ALL
and ANY
.
Other strategies that will be considered for implementation in a future
release include ROUND-ROBIN
, LOAD-BALANCE
and SKILL-BASED
.
The ALL Completion Strategy
The ALL
strategy marks an activity
complete when all of its work items have been closed. ALL
is the default strategy that is applied if none is specified.
The ANY Completion Strategy
The ANY
strategy marks an
activity complete as soon as any of its work items have been closed.
Completion Strategy Meta-data
Completion
strategy meta-data
are used to register a completion strategy. The basic completion
strategy factory implementation that comes with OBE stores these data
in the configuration
file BasicCompletionStrategyFactory.xml
;
the entries have this format:
<completion-strategy id="nmtoken" type="nmtoken"? threadsafe="true|false"?>
<display-name .../>?
<author .../>?
<description .../>?
<doc-url .../>?
<impl-class .../>
<impl-ctor-sig>?
<class .../>*
</impl-ctor-sig>
</completion-strategy>
- impl-class
- The fully qualified Java class name of the implementing
class.
- impl-ctor-sig
- The nested class elements define the signature of the
constructor for the specified class.
- class
- The fully qualified Java class name of the constructor
parameter.
XPDL Extension
The completion strategy is specified by an XPDL ExtendedAttribute with
the name 'obe.CompletionStrategy
', whose value
is the completion strategy ID. Completion strategies can be specified
at any or all of the
following levels, in order of descending precedence: Activity,
WorkflowProcess, Package.
The syntax is:
<xpdl:ExtendedAttribute Name="obe.CompletionStrategy" Value="nmtoken"? />
- Value
- The completion strategy ID, used as a lookup key by the
factory.
For example:
<Activity Id="approve" Name="First-past-the-post document approval">
<Description>
This auto-finish approval activity will be marked complete as soon as
one participant from the Users group marks their work item complete.
</Description>
<Implementation>
<Tool Id="my.registerApproval" Type="APPLICATION">
<ActualParameters>
<ActualParameter>'DOCUMENT'</ActualParameter>
<ActualParameter>$documentURI</ActualParameter>
<ActualParameter>$approved</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>Users</Performer>
<ExtendedAttributes>
<ExtendedAttribute Name="obe.CompletionStrategy" Value="ANY" />
</ExtendedAttributes>
</Activity>