public class PlannableItem extends Object
<p>This is basically a static model element. Run-time plan item instances always map to a static model element but represent run-time state and introduce an instance ID extension to the model element ID.</p>
<p>A class representing an item that can be planned. It can be instantiated from a TPlanItem
or a
TDiscretionaryItem
or a TStage
(in the case of the casePlanModel).</p>
<p>TPlanItem
's are considered planed already.
TDiscretionaryItem
may get planed. A planed item is a child of a stage
(see Stage
).</p>
Constructor and Description |
---|
PlannableItem(TDiscretionaryItem tDiscretionaryItem,
PlannableItem parent)
<p>Construct a plannable item based on a
TDiscretionaryItem . |
PlannableItem(TPlanItem tPlanItem,
PlannableItem parent)
<p>Construct a 'plannable' item, instantiated from a
TPlanItem . |
PlannableItem(TStage tStage)
<p>Construct the plannable item representing the case plan model when only the static model structure
is needed and no run-time state is available.
|
PlannableItem(TStage tStage,
StateModel stateModel)
<p>Use only for the Case’s implicit top-level stage!
|
public PlannableItem(TStage tStage, StateModel stateModel)
<p>Use only for the Case’s implicit top-level stage!</p>
<p>The current version of the XSD and hence the generated XML doesn’t allow for a top level TPlanItem corresponding to the casePlanModel (TStage) itself. To remedy this, for the top-level casePlanModel, a PlannableItem is created here with just its tStage.</p>
tStage
- the stagestateModel
- the state modelpublic PlannableItem(TPlanItem tPlanItem, PlannableItem parent)
<p>Construct a 'plannable' item, instantiated from a TPlanItem
.</p>
tPlanItem
- the plan itemparent
- the parent plannable itempublic PlannableItem(TDiscretionaryItem tDiscretionaryItem, PlannableItem parent)
<p>Construct a plannable item based on a TDiscretionaryItem
.</p>. If the plannable item
has applicability rules, it becomes plannable as soon as the applicability rules fire. If there are no applicability rules,
the item is immediately plannable.
tDiscretionaryItem
- the discretionary itemparent
- the parent plannable itempublic PlannableItem(TStage tStage)
<p>Construct the plannable item representing the case plan model when only the static model structure is needed and no run-time state is available.</p>.
<p>Currently only used during migration of state models.</p>
public void setParent(PlannableItem parent)
parent
- the parent plannable itempublic boolean isEventListener()
true
if this plannable item represents an event listener. false
otherwise.public boolean evaluateApplicabilityRules(TransitionData transitionData, PlanningListeners planningListeners, EvaluationListeners evaluationListeners)
planningListeners
- the planning listenerstrue
if its 'availableForPlanning' property changed. Return
false
otherwise.public void registerNewInstance(PlanItem planItem)
Register the passed planItem instance with its plannable item and the state model.
planItem
- the plan item to register.public String getCustomAttribute(String name)
Get the value of a named custom attribute.
name
- the name of the attribute.null
.public String getExtensionType()
public String getHideActionIf()
public String getStateVisible()
public int getVisualizationOrder()
public int getActionOrder()
public final String getId()
public String getName()
public String getName(Locale locale)
locale
- the required localepublic String getActionName()
public String getName(PlanItem evaluationContext, TransitionData transitionData, EvaluationListeners evaluationListeners)
public String getActionName(PlanItem evaluationContext, TransitionData transitionData, EvaluationListeners evaluationListeners)
public String getDescription()
public String getActionDescription()
public String getActionUsers()
public String getActionUsers(TransitionData transitionData, EvaluationListeners evaluationListeners)
public String getActionGroups()
public String getActionGroups(TransitionData transitionData, EvaluationListeners evaluationListeners)
public PlannableItem getParent()
public List<Sentry> getListenerSentries()
public void resetListeners()
The listenerSentries array is cached. It is created in a lazy fashion and returned afterwards on successive calls. However, each time a new stage is started, new PlannableItems may potentially be added to the plannable items pool with the effect that the list of listenerSentries may also grow. This method is called at the time a new stage is started, forcing the re-calculation of this array when requested the next time.
public void applyVisitor(PlannableItemVisitor visitor, TransitionData transitionData)
Apply a visitor to this plannable item (GOF visitor pattern).
visitor
- the plannable item visitor.public StateModel getStateModel()
public boolean isCasePlanModel()
public Rule getRepetitionRule()
public Rule getRequiredRule()
public Rule getManualActivationRule()
public TPlanItemDefinition getTPlanItemDefinition()
public boolean isAvailableForPlanning()
public void setAvailableForPlanning(boolean availableForPlanning)
public boolean hasOnPart()
public boolean isBlocking()
<p>The 'blocking' property applies to tasks (human task, process task, case task). The default is true
meaning that the
life-cycle of the task is managed by the case engine.</p>
<p>The lifecycle of non-blocking tasks is not managed by the case engine. Once a non-blocking task is started, it is immediately completed from the point of view of the case engine.</p>
true
if this plannable item is not a task or the task is 'blocking', i.e. has its 'blocking'
attribute set to true. Return false
otherwise.public PlannableItem[] getStagePath()
public int commonStagePathLength(PlannableItem[] otherPath)
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.