[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sapphire-dev] Expression based on element type
|
I need to write an
_expression_ based on element type so that a diagram node can have different
images depending on the element type. Here is my property:
// ***
TaskFlowReference ***
@Type
(
base = ITaskFlowReference.class,
possible =
{
IStaticTaskFlowReference.class,
IDynamicTaskFlowReference.class
}
)
@Label(
standard = "task flow reference" )
@XmlElementBinding
(
mappings =
{
@XmlElementBinding.Mapping( element = "task-flow-reference", type =
IStaticTaskFlowReference.class
),
@XmlElementBinding.Mapping( element = "dynamic-task-flow-reference", type =
IDynamicTaskFlowReference.class )
}
)
ElementProperty PROP_TASK_FLOW_REFERENCE = new
ElementProperty( TYPE, "TaskFlowReference" );
I'd like to have
something like the following to represent my node image id:
${TaskFlowReference
instanceof IStaticTaskFlowReference ? (((IStaticTaskFlowReference)TaskFlow).Id
!= null ? completeTFCallIcon : incompleteTFCallIcon) :
incompleteTFCallIcon}
Is this possible
with the built in Sappire _expression_ support or I'd need to write a custom
function?
Thanks,
Shenxue