public interface TemplateStatus
extends java.io.Serializable
TemplateProxy| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areInstancesChangeable(boolean subprocessScope)
Returns whether instances running on this template may be changed or not.
|
boolean |
areInstancesMigratableTo(boolean subprocessScope)
Returns whether instances running on a parent process template may be
migrated to this process template or not.
|
ProcessConstants.TemplateBuildtimeState |
getBuildtimeState()
Gets the state of this process template while it may be modified and is not
released.
|
java.lang.String |
getDerivableComment()
Returns the comment set for the derivable status for either subprocess or
top-level-usage.
|
java.lang.String |
getInstancesChangeableComment(boolean subprocessScope)
Returns the comment set for the "instances changeable"-status for either
subprocess or top-level-usage.
|
java.lang.String |
getInstancesMigratableToComment(boolean subprocessScope)
Returns the comment set for the "instances migratable to"-status for either
subprocess or top-level-usage.
|
java.lang.String |
getInstantiableComment(boolean subprocessScope)
Returns the comment set for the instantiable status for either subprocess
or top-level-usage.
|
java.lang.String |
getOutdatedComment(boolean subprocessScope)
Returns the comment set for the outdated status for either subprocess or
top-level-usage.
|
java.lang.String |
getStarterRule()
Gets the staff rule which specifies which agent may create and start an
instance of this template.
|
java.util.UUID |
getTemplateID()
Returns the ID of the template this status object belongs to.
|
ProcessConstants.TemplateUsage |
getUsageAsSubprocess()
Gets how the template may be used, that is whether the template may be used
as a top-level process only, a copied subprocess, a referenced subprocess
or both.
|
boolean |
isDerivable()
Returns whether this process template may be derived and therefore
modified.
|
boolean |
isInstantiable(boolean subprocessScope)
Returns whether this process template may be instantiated or not.
|
boolean |
isOutdated(boolean subprocessScope)
Returns whether this process template is outdated and should not be used
any more.
|
boolean |
isTopLevelUsable()
Returns whether this template may be used as top-level process
|
void |
release()
Enables the instantiation and usage of the process template by setting the
buildtime state to
RELEASED. |
void |
setDerivable(boolean derivable,
java.lang.String comment)
Sets the designated template to derivable or not.
|
void |
setInstancesChangeable(boolean instancesChangeable,
boolean subprocessScope,
java.lang.String comment)
Sets the designated template to instances changeable to or not.
|
void |
setInstancesMigratableTo(boolean instancesMigratableTo,
boolean subprocessScope,
java.lang.String comment)
Sets the designated template to instances migratable to or not.
|
void |
setInstantiable(boolean instantiable,
boolean subprocessScope,
java.lang.String comment)
Sets the designated template to instantiable or not.
|
void |
setOutdated(boolean outdated,
boolean subprocessScope,
java.lang.String comment)
Sets the designated template to outdated or active.
|
void |
setStarterRule(java.lang.String starterRule)
Sets the staff assignment rule which specifies which agent may create and
start an instance of this template.
|
void |
setSubprocessUsage(ProcessConstants.TemplateUsage usage)
Sets how the designated template may be used as subprocess.
|
void |
setTopLevelUsage(boolean useAsTopLevel)
Sets whether the designated template may be used and instantiated as
top-level process.
|
static final long serialVersionUID
java.util.UUID getTemplateID()
java.lang.String getStarterRule()
ActivityTemplate.getStaffAssignmentRule()boolean isTopLevelUsable()
true if this process template may be instantiated as
top-level process.ProcessConstants.TemplateUsage getUsageAsSubprocess()
boolean isOutdated(boolean subprocessScope)
Please note that the returned state will have to be ignored if the request
is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.true if this process template is outdated and should
not be used any more. Ignore the returned value if the request is
for subprocess scope and the template usage is
TemplateUsage.NO_SUBPROCESS.ProcessConstants.TemplateUsage,
getUsageAsSubprocess()java.lang.String getOutdatedComment(boolean subprocessScope)
Please note that the returned comment will have to be ignored if the
request is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.TemplateUsage.NO_SUBPROCESS.boolean isInstantiable(boolean subprocessScope)
Please note that the returned state will have to be ignored if the request
is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.true if this process template may be instantiated.
Ignore the returned value if the request is for subprocess scope
and the template usage is TemplateUsage.NO_SUBPROCESS.ProcessConstants.TemplateUsage,
getUsageAsSubprocess()java.lang.String getInstantiableComment(boolean subprocessScope)
Please note that the returned comment will have to be ignored if the
request is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.TemplateUsage.NO_SUBPROCESS.boolean isDerivable()
true if the referenced process template may be
derived.java.lang.String getDerivableComment()
boolean areInstancesMigratableTo(boolean subprocessScope)
Please note that the returned state will have to be ignored if the request
is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.true if instances may be migrated to the referenced
process template. Ignore the returned value if the request is for
subprocess scope and the template usage is
TemplateUsage.NO_SUBPROCESS.ProcessConstants.TemplateUsage,
getUsageAsSubprocess()java.lang.String getInstancesMigratableToComment(boolean subprocessScope)
Please note that the returned comment will have to be ignored if the
request is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.TemplateUsage.NO_SUBPROCESS.boolean areInstancesChangeable(boolean subprocessScope)
Please note that the returned state will have to be ignored if the request
is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.true if instances may be changed. Ignore the
returned value if the request is for subprocess scope and the
template usage is TemplateUsage.NO_SUBPROCESS.ProcessConstants.TemplateUsage,
getUsageAsSubprocess()java.lang.String getInstancesChangeableComment(boolean subprocessScope)
Please note that the returned comment will have to be ignored if the
request is for subprocess scope and the template usage is
NO_SUBPROCESS.
subprocessScope - Whether the scope of the asked for template state is
for subprocess usage (template is referenced) or for usage as
top-level process.TemplateUsage.NO_SUBPROCESS.ProcessConstants.TemplateBuildtimeState getBuildtimeState()
void setStarterRule(java.lang.String starterRule)
starterRule - The staff assignment rule which specifies which
agent may create and start an instance of this template.void setTopLevelUsage(boolean useAsTopLevel)
useAsTopLevel - Whether the specified process template may be
instantiated as top-level process.void setSubprocessUsage(ProcessConstants.TemplateUsage usage)
NO_SUBPROCESS: the template can not be used as a
subprocess
AS_COPY: the template is copied and physically
integrated (embedded) in the corresponding superprocess
AS_REFERENCE: the template is referenced in the
superprocess and may be subject to late binding or schema evolution
COPY_OR_REFERENCE: the template can be used as copy or
as reference depending on the modelers demand
TemplateUsage.NO_SUBPROCESS.usage - Whether the specified process template may be instantiated as
top-level process.void release()
throws InvalidTemplateStateException
RELEASED. A released template may not be
changed any more. One has to derive a new child template for modifications
instead. Only a valid, that is a template compliant to the ADEPT-metamodel,
may be released.
When releasing a template the substates are set to the following default values for both usages, top-level as well as subprocess:
OUTDATED: false
DERIVABLE (scope-independent): true
INSTANCEABLE: false
INSTANCES_MIGRATABLE_TO: false
INSTANCES_CHANGEABLE: true
Precondition:
(template.getBuildtimeState() == ProcessConstants.TemplateBuildtimeState.VALID)
Postcondition:
(template.getBuildtimeState() == ProcessConstants.TemplateBuildtimeState.RELEASED)
&& !template.isOutdated(true | false)
&& template.isDerivable()
&& !template.isInstantiable(true | false)
&& !template.areInstancesMigratableTo(true | false)
&& template.areInstancesChangeable(true | false)
InvalidTemplateStateException - If the process template is not valid, an
InvalidTemplateStateException will be raised.ProcessConstants.TemplateBuildtimeStatevoid setOutdated(boolean outdated,
boolean subprocessScope,
java.lang.String comment)
throws InvalidTemplateStateException
NO_SUBPROCESS, the method call will be ignored.outdated - Whether the template is outdated or active.subprocessScope - Whether the the outdated-state is valid for
subprocess usage or top-level usage..comment - The comment for the status to be set. The comment will
override the former comment. The parameter may be null.InvalidTemplateStateException - If the process template is not
released (in state
ProcessConstants.TemplateBuildtimeState.RELEASED,
an InvalidTemplateStateException will be raised.void setDerivable(boolean derivable,
java.lang.String comment)
throws InvalidTemplateStateException
NO_SUBPROCESS, the method call will be ignored.derivable - Whether the template is derivable.comment - The comment for the status to be set. The comment will
override the former comment. The parameter may be null.InvalidTemplateStateException - If the process template is not
released (in state
ProcessConstants.TemplateBuildtimeState.RELEASED,
an InvalidTemplateStateException will be raised.void setInstantiable(boolean instantiable,
boolean subprocessScope,
java.lang.String comment)
throws InvalidTemplateStateException
NO_SUBPROCESS, the method call will be ignored.instantiable - Whether the template may be instantiated.subprocessScope - Whether the the outdated-state is valid for
subprocess usage or top-level usage.comment - The comment for the status to be set. The comment will
override the former comment. The parameter may be null.InvalidTemplateStateException - If the process template is not
released (in state
ProcessConstants.TemplateBuildtimeState.RELEASED,
an InvalidTemplateStateException will be raised.void setInstancesMigratableTo(boolean instancesMigratableTo,
boolean subprocessScope,
java.lang.String comment)
throws InvalidTemplateStateException
false, no instances (top-level and/or subprocess)
can be migrated to the designated template. If this method is called with
subprocess scope and for a template with template usage
NO_SUBPROCESS, the method call will be ignored.instancesMigratableTo - Whether instances may be migrated to the
designated template.subprocessScope - Whether the the instancesMigratableTo-state is valid
for subprocess usage or top-level usage.comment - The comment for the status to be set. The comment will
override the former comment. The parameter may be null.InvalidTemplateStateException - If the process template is not
released (in state
ProcessConstants.TemplateBuildtimeState.RELEASED,
an InvalidTemplateStateException will be raised.void setInstancesChangeable(boolean instancesChangeable,
boolean subprocessScope,
java.lang.String comment)
throws InvalidTemplateStateException
false, no instances (in the given subprocess scope)
can be ad-hoc modified. If this method is called with subprocess scope and
for a template with template usage NO_SUBPROCESS, the
method call will be ignored.instancesChangeable - Whether instances running on the designated
template may be individually changed.subprocessScope - Whether the the instancesChangeable-state is valid
for subprocess usage or top-level usage.comment - The comment for the status to be set. The comment will
override the former comment. The parameter may be null.InvalidTemplateStateException - If the process template is not
released (in state
ProcessConstants.TemplateBuildtimeState.RELEASED,
an InvalidTemplateStateException will be raised.