Name
sn_flow_diagram.FlowDiagramConstants
Description
No description available
Script
var FlowDiagramConstants = Class.create();
FlowDiagramConstants.prototype = {
initialize: function() {},
type: "FlowDiagramConstants"
};
FlowDiagramConstants.ID_INPUTS = {
ACTION_TYPE_IDS: "actionTypeIds",
DIAGRAM_ACTION_TYPE_IDS: "diagramActionIds",
FLOWLOGIC_TYPE_IDS: "flowlogicTypeIds",
SUBFLOW_TYPE_IDS: "subflowTypeIds"
};
FlowDiagramConstants.ACTION_MAP_ID_TYPE = {
ACTION_TYPE: "action",
DIAGRAM_ACTION_TYPE: "diagramAction"
};
FlowDiagramConstants.SYS_IDS = {
FLOW_LOGIC_ONE_TO_MANY: "e5e5c6deb7c93010388487c2de11a91b", //do the following in parallel
FLOW_LOGIC_ONE_TO_ONE: "f340f335b7c13010388487c2de11a9b0", // simple flowlogic like wait for a duration
FLOW_LOGIC_ONE_TO_ONE_ACTION: "5ba0f735b7c13010388487c2de11a9e7",
FLOW_LOGIC_ONE_TO_MANY_ACTION: "3f1a8e52b70d3010388487c2de11a95b",
FLOW_LOGIC_LOOP_TYPE: "e1160adeb7c93010388487c2de11a970",
FLOW_LOGIC_DO_LOOP_TYPE: "e1160adeb7c93010388487c2de11a970",
FLOW_LOGIC_CONDITIONAL_NODE_TYPE: "7e221c2177f430104f27ceec8e5a9915", // two output ports, like if/ifelse
FLOW_ACTION_NODE_TYPE: "a2bfc11d772cf010b2b4ddd9cf5a990d",
FLOW_ACTION_DIAGRAM_ACTION: "2c0eb45e77cd3010b2b4ddd9cf5a994b",
FLOW_LOGIC_CONDITIONAL_DIAGRAM_ACTION: "8c340f41773030104f27ceec8e5a999b",
FLOW_LOGIC_LOOP_DIAGRAM_ACTION: "c74a8e52b70d3010388487c2de11a9e6",
FLOW_LOGIC_DO_LOOP_DIAGRAM_ACTION: "c74a8e52b70d3010388487c2de11a9e6",
FLOW_LOGIC_END_ACTION: "5ba0f735b7c13010388487c2de11a9e7",
FLOW_LOGIC_PATH_BROKEN_ACTION: "9ea61a68c3b130105c68006c2840dddd",
FLOW_END_NODE_TYPE: "0df8e26efff230104ef14ee9453bf17e", // blank node
FLOW_LOGIC_END_LOOP_ACTION: "cd792aaefff230104ef14ee9453bf120", // blank node action
FLOW_LOGIC_END_DO_LOOP_ACTION: "3f1a8e52b70d3010388487c2de11a95b", // blank node action
FLOW_STAGE_ACTION: "a1d21252c36501105c68006c2840dd82",
FLOW_LOGIC_END_IF_ACTION: "cd792aaefff230104ef14ee9453bf120", // same as FLOW_LOGIC_END_LOOP_ACTION
FLOW_LOGIC_END_PARALLEL_ACTION: "cd792aaefff230104ef14ee9453bf120", // same as FLOW_LOGIC_END_LOOP_ACTION
FLOW_LOGIC_BEGINNING_PARALLEL_ACTION: "3f1a8e52b70d3010388487c2de11a95b", // same as FLOW_LOGIC_ONE_TO_MANY_ACTION
FLOW_LOGIC_PARALLEL_ACTION: "3f1a8e52b70d3010388487c2de11a95b", // same as FLOW_LOGIC_ONE_TO_MANY_ACTION
FLOW_LOGIC_PARALLEL_BLOCK: "0df8e26efff230104ef14ee9453bf17e", // same as FLOW_END_NODE_TYPE
FLOW_LOGIC_PARALLEL_BLOCK_ACTION: "b4157c5b77210110f92a7a8c8c5a9987",
FLOW_LOGIC_DECISION_BLOCK: "49a678bc77651110b2b4ddd9cf5a996f", // Flow MAD Branch Node Base Template
FLOW_LOGIC_DECISION_ACTION: "3f1a8e52b70d3010388487c2de11a95b", // same as FLOW_LOGIC_ONE_TO_MANY_ACTION
FLOW_LOGIC_DECISION_BLOCK_ACTION: "ff97840fb7651110f92afd31ae11a952",
FLOW_LOGIC_END_DECISION_ACTION: "cd792aaefff230104ef14ee9453bf120", // same as FLOW_LOGIC_END_LOOP_ACTION
FLOW_LOGIC_GO_BACK_TO_ACTION: "36c232f677d82110b2b4ddd9cf5a99e0",
// These should be the node connector id, not the connector port id
DIAGRAM_PORT_ACTION_INPUT_SYS_ID: "d8a8be1b77f07010b2b4ddd9cf5a996c",
DIAGRAM_PORT_ACTION_OUTPUT_SYS_ID: "0cc8325b77f07010b2b4ddd9cf5a9995",
DIAGRAM_PORT_IF_ELSE_INPUT_SYS_ID: "245c790b77b470104f27ceec8e5a99df",
DIAGRAM_PORT_IF_ELSE_OUTPUT_TRUE_SYS_ID: "8671e68677b070104f27ceec8e5a9934",
DIAGRAM_PORT_IF_ELSE_OUTPUT_FALSE_SYS_ID: "9712ae8677b070104f27ceec8e5a993a",
DIAGRAM_PORT_FOR_INPUT_NORMAL_SYS_ID: "6c69c370b7823010388487c2de11a91c",
DIAGRAM_PORT_FOR_INPUT_LOOP_BACK_SYS_ID: "194acf70b7823010388487c2de11a98d",
DIAGRAM_PORT_FOR_INPUT_DO_LOOP_BACK_SYS_ID: "194acf70b7823010388487c2de11a98d",
DIAGRAM_PORT_FOR_OUTPUT_SYS_ID: "c89ac3b0b7823010388487c2de11a98c",
DIAGRAM_PORT_END_INPUT_SYS_ID: "fd40bc29c33130105c68006c2840dd4b",
DIAGRAM_STAGE_OUTPUT_SYS_ID: "ae141692c36501105c68006c2840dd11",
DIAGRAM_STAGE_INPUT_SYS_ID: "11931e52c36501105c68006c2840ddbc",
DIAGRAM_PORT_PATH_BROKEN_OUTPUT_SYS_ID: "8c289ea8c3b130105c68006c2840dd85",
DIAGRAM_PORT_ONE_TO_ONE_INPUT: "fd40bc29c33130105c68006c2840dd4b",
DIAGRAM_PORT_ONE_TO_ONE_OUTPUT: "4150bc29c33130105c68006c2840dda2",
DIAGRAM_PORT_ONE_TO_MANY_INPUT: "da02462fb7010110f92afd31ae11a9c2",
DIAGRAM_PORT_ONE_TO_MANY_OUTPUT: "4362822fb7010110f92afd31ae11a917",
DIAGRAM_PORT_END_LOOP_INPUT_SYS_ID: "f0192a6efff230104ef14ee9453bf152",
DIAGRAM_PORT_END_DO_LOOP_INPUT_SYS_ID: "da02462fb7010110f92afd31ae11a9c2",
DIAGRAM_PORT_END_LOOP_OUTPUT_SYS_ID: "f629ea6efff230104ef14ee9453bf193",
DIAGRAM_PORT_END_DO_LOOP_OUTPUT_SYS_ID: "4362822fb7010110f92afd31ae11a917",
DIAGRAM_PORT_END_DO_LOOP_OUTPUT_LOOPBACK_SYS_ID: "dad8270243a961109177f17dd9b8f245",
DIAGRAM_PORT_END_IF_INPUT_SYS_ID: "f0192a6efff230104ef14ee9453bf152", // same as DIAGRAM_PORT_END_LOOP_INPUT_SYS_ID
DIAGRAM_PORT_END_IF_OUTPUT_SYS_ID: "f629ea6efff230104ef14ee9453bf193", // same as DIAGRAM_PORT_END_LOOP_OUTPUT_SYS_ID
DIAGRAM_PORT_BEGINNING_PARALLEL_INPUT_SYS_ID: "da02462fb7010110f92afd31ae11a9c2", // same as DIAGRAM_PORT_ONE_TO_MANY_INPUT
DIAGRAM_PORT_BEGINNING_PARALLEL_OUTPUT_SYS_ID: "4362822fb7010110f92afd31ae11a917", // same as DIAGRAM_PORT_ONE_TO_MANY_OUTPUT
DIAGRAM_PORT_PARALLELBLOCK_INPUT_SYS_ID: "f0192a6efff230104ef14ee9453bf152", // same as DIAGRAM_PORT_END_LOOP_INPUT_SYS_ID
DIAGRAM_PORT_PARALLELBLOCK_OUTPUT_SYS_ID: "f629ea6efff230104ef14ee9453bf193", // same as DIAGRAM_PORT_END_LOOP_OUTPUT_SYS_ID
DIAGRAM_PORT_END_PARALLEL_INPUT_SYS_ID: "f0192a6efff230104ef14ee9453bf152", // same as DIAGRAM_PORT_END_LOOP_INPUT_SYS_ID
DIAGRAM_PORT_END_PARALLEL_OUTPUT_SYS_ID: "f629ea6efff230104ef14ee9453bf193", // same as DIAGRAM_PORT_END_LOOP_OUTPUT_SYS_ID
DIAGRAM_PORT_DECISIONBLOCK_INPUT_SYS_ID: "ccb3fc2177421110f92a7a8c8c5a9943",
DIAGRAM_PORT_DECISIONBLOCK_OUTPUT_SYS_ID: "afc3bc2177421110f92a7a8c8c5a994a",
DIAGRAM_PORT_END_DECISION_INPUT_SYS_ID: "f0192a6efff230104ef14ee9453bf152", // same as DIAGRAM_PORT_END_LOOP_INPUT_SYS_ID
DIAGRAM_PORT_END_DECISION_OUTPUT_SYS_ID: "f629ea6efff230104ef14ee9453bf193", // same as DIAGRAM_PORT_END_LOOP_OUTPUT_SYS_ID
DIAGRAM_PORT_GOBACKTO_INPUT_SYS_ID: "4714f23a77d82110b2b4ddd9cf5a99b9",
DIAGRAM_PORT_GOBACKTO_OUTPUT_SYS_ID: "ea64363a77d82110b2b4ddd9cf5a997b",
SN_FLOW_DIAGRAM_BUILDER_CONFIGURATION: "f7052724c3d030101099006c2840dd80",
FLOW_DIAGRAM_TEMPLATE_TRIGGER_NODE_ID: "1fde385e77cd3010b2b4ddd9cf5a990b",
FLOW_DIAGRAM_TEMPLATE_ADD_A_NODE_NODE_ID: "2ecf68c3b7fa3010388487c2de11a96c",
FLOW_DIAGRAM_TEMPLATE_ADD_TRIGGER_NODE_ID: "5d1510c3b7ba3010388487c2de11a9c7",
FLOW_DIAGRAM_TEMPLATE_SUBFLOW_INS_OUTS_NODE_ID: "0c2906cc53a82110ffc2ddeeff7b1230",
FLOW_DIAGRAM_TEMPLATE_ADD_A_SUBFLOW_INS_OUTS_NODE_ID: "b0c2161353602110ffc2ddeeff7b12de",
FLOW_LOGIC_IF_DEFINITION_SYS_ID: "af4e1945c3e232002841b63b12d3ae3e",
FLOW_LOGIC_ELSEIF_DEFINITION_SYS_ID: "666e5545c3e232002841b63b12d3ae99",
FLOW_LOGIC_END_LOOP_IF_ACTION: "cd792aaefff230104ef14ee9453bf120",
FLOW_LOGIC_END_DO_LOOP_IF_ACTION: "cd792aaefff230104ef14ee9453bf120",
FLOW_LOGIC_STAGE_ACTION: "a1d21252c36501105c68006c2840dd82"
};
FlowDiagramConstants.NODE_KEYS = {
FLOW_DIAGRAM_ADD_TRIGGER_NODE_KEY: "2cd20929-886b-4e85-9ce3-29c7f25ada28",
FLOW_DIAGRAM_ADD_SUBFLOW_INPUTS_OUTPUTS_KEY: "846bb110-afb8-2110-c7ea-22ebcb6384f7",
};
FlowDiagramConstants.NODE_TYPES = {
SIMPLE: "simple",
CONDITIONAL: "conditional",
BLOCK: "block",
END: "end",
ONE_TO_MANY: "oneToMany",
GO_BACK_TO: "goBackTo",
ADD_A_NODE: "addANode",
SUBFLOW_INS_OUTS: "Subflow InsOuts"
};
FlowDiagramConstants.SOURCE_NODE_KEYS = {
SOURCE_PARALLEL: "endParallelNodeKey",
SOURCE_DECISION: "endDecisionNodeKey",
SOURCE_IF: "sourceIfNodeKey",
SOURCE_LOOP: "loopStartNodeKey"
};
FlowDiagramConstants.LAYOUT_CONFIGURATION = {
DECISION_LABEL: "decision_label",
NODE_ID: "node_id",
DEFINITION_SYS_ID: "definition_sys_id",
HEIGHT_VERTICAL_LINK_PB: 30,
HEIGHT_VERTICAL_LINK: 40,
HEIGHT_VERTICAL_LINK_WITH_LABEL: 64,
HEIGHT_VERTICAL_LINK_IF_END: 64,
HEIGHT_VERTICAL_LINK_IF_END_WITH_LABEL: 88,
HEIGHT_VERTICAL_LINK_LOOP_END: 96,
HEIGHT_VERTICAL_LINK_PARALLEL: 80,
HEIGHT_VERTICAL_LINK_DECISION: 60,
HEIGHT_VERTICAL_LINK_DECISION_WITHOUT_STAGE: 67,
HEIGHT_VERTICAL_LINK_GOBACKTO_TARGET: 48,
STAGE_VERTICAL_LINK: 5,
STAGE_TOP_OFFSET: 5,
MINIMUM_HEIGHT_WITH_CUSTOM_LINK: 64,
NODE_GAP_HORIZONTAL: 48,
NODE_GAP_HORIZONTAL_PARALLEL: 40,
NODE_GAP_HORIZONTAL_STAGE: 28,
NODE_WIDTH_STANDARD: 212,
EDGE_GAP: 16,
EDGE_GAP_LARGE: 24,
EDGE_GAP_GOBACKTO: 16,
EDGE_STICK_OUT_RIGHT: 24,
ONE_TO_MANY_ALIGN_CENTER_ENABLED: true,
IF_WITH_ELSE_OR_ELSE_IF_OFFSET: 20,
ONE_TO_MANY_ICON_X_OFFSET: 14,
GOBACKTO_ROUTE_POINTS: 9
};
FlowDiagramConstants.TABLE_NAMES = {
DIAGRAM_BUILDER: {
NODE_TYPE: "sn_diagram_builder_node_type",
CONTEXT_MENU_OPTION_M2M: "sn_diagram_builder_node_type_context_menu_option_m2m", // from the flow diagramming node type context menu list
CONTEXT_MENU_OPTION: "sn_diagram_builder_context_menu_option", // list of available context menu options
NODE_CONNECTOR: "sn_diagram_builder_node_connector",
NODE_CONNECTOR_PORT: "sn_diagram_builder_connector_port",
SPOT: "sn_diagram_builder_spot",
DIAGRAM_ACTION: "sn_diagram_builder_diagram_action",
CANVAS_ACTION: "sn_diagram_builder_canvas_action",
CONFIGURATION: "sn_diagram_builder_configuration",
DIAGRAM_TEMPLATE: "sn_diagram_builder_diagram_template",
NODE_TYPE_HANDLER: "sn_diagram_builder_node_type_handler",
},
ACTIONS: {
ACTION_TYPE_DEFINITION: "sys_hub_action_type_definition"
},
FLOW: {
BASE: "sys_hub_flow_base"
},
FLOWLOGICS: {
FLOW_LOGIC_DEFINITION: "sys_hub_flow_logic_definition"
},
SCOPE: "sys_scope",
UX_LIB_COMPONENT: "sys_ux_lib_component",
APP: "sys_app",
};
FlowDiagramConstants.FIELD_NAMES = {
DIAGRAM_BUILDER: {
CANVAS_ACTION: {
NAME: "name",
ORDER: "order",
ACTION_TYPE: "action_type",
UI_COMPONENT: "ui_component"
},
CONFIGURATION: {
PROPS: "props",
NAME: "name",
RIGHT_PANEL: "right_panel",
LEFT_PANEL: "left_panel",
THEME: "theme",
ADVANCED: "advanced",
LEFT_COMPONENT: "left_component",
LEFT_COMPONENT_TAG: "left_component.tag",
RIGHT_COMPONENT: "right_component",
RIGHT_COMPONENT_TAG: "right_component.tag",
ALERTS_COMPONENT: "alerts_component",
ALERTS_COMPONENT_TAG: "alerts_component.tag",
HEADER: "header",
DIAGRAM_TEMPLATE: "diagram_template",
DIAGRAM_TEMPLATE_TEMPLATE_JSON: "diagram_template.template_json",
SCOPE: "sys_scope",
LAYOUT: "layout",
ENABLE_LAYOUT_CUSTOMIZATION: "enable_layout_customization",
ENABLE_DRAGGING: "enable_dragging",
CONTENT_ALIGNMENT: "Center",
ENABLE_ANIMATION: "enable_animation",
ENABLE_SEARCH: "enable_search",
DIAGRAM_OPTIONS: "diagram_options"
},
DIAGRAM_TEMPLATE: {
TEMPLATE_JSON: "template_json"
}
},
ACTIONS: {
ACTION_TYPE_DEFINITION: {
NAME: "name"
}
},
UX_LIB_COMPONENT: {
TAG: "tag"
},
APP: {
SCOPE: "scope"
}
};
FlowDiagramConstants.NODE_NAMES = {
START: gs.getMessage("Start"),
TRIGGER: gs.getMessage("Trigger"),
END: gs.getMessage("End"),
PATH_BROKEN: gs.getMessage("Path broken"),
ADD_TRIGGER: gs.getMessage("Add a Trigger"),
ADD_NODE: gs.getMessage("Add a node"),
GHOST_ACTION: gs.getMessage("Action missing"),
PARALLEL_BRANCH: gs.getMessage("Parallel Branch"),
DECISION: gs.getMessage("Make a decision"),
GOBACKTO: gs.getMessage("Go back to"),
INPUTS_OUTPUTS: gs.getMessage("Inputs and Outputs"),
ADD_INPUTS_OUTPUTS: gs.getMessage("Add Inputs and Outputs"),
DO_FOLLOWING: gs.getMessage("Do the following"),
UNTIL: gs.getMessage("Until")
};
FlowDiagramConstants.INSTANCE_TYPES = {
ACTION_INSTANCE_TYPE: "ActionInstanceType",
FLOW_LOGIC_INSTANCE_TYPE: "FlowLogicInstanceType",
COMPONENT_INSTANCE_TYPE: "ComponentInstanceType",
SUBFLOW_INSTANCE_TYPE: "SubflowInstanceType",
STAGE_TYPE: "StageType",
SUBFLOW_INPUTS_OUTPUTS_TYPE: "SubflowInputsOutputsType",
TRIGGER_TYPE: "TriggerType"
};
FlowDiagramConstants.IMAGES_PATH = {
DIAGRAM_LOGIC: "/images/diagram-logic-",
DEFAULT_ICON: "/images/snow-icon-round.svg",
GHOST_ICON: "/images/triangle-exclamation.svg",
CONTEXT_MENU_VIEW: "/sn_flow_diagram_view.png",
CONTEXT_MENU_DELETE: "/sn_flow_diagram_delete.png",
CONTEXT_MENU_OPEN: "/sn_flow_diagram_open_link_right_outline.png",
CONTEXT_MENU_DUPLICATE: "/sn_flow_diagram_duplicate.png"
};
FlowDiagramConstants.LINK_LABELS = {
trueConnector: gs.getMessage("True"),
falseConnector: gs.getMessage("False"),
loopBackConnector: gs.getMessage("Continue"),
loopContinueConnector: gs.getMessage("End"),
};
FlowDiagramConstants.LINK_LABEL_COLORS = {
decision: "#E9E1F1",
loop: "#D2E7E3",
};
FlowDiagramConstants.NODE_ICON_BACKGROUND_COLORS = {
GHOST: "#e2d859"
};
FlowDiagramConstants.CONTEXT_MENU_OPTIONS = {
view: gs.getMessage("View"),
"delete": gs.getMessage("Delete")
};
FlowDiagramConstants.LINK_LABEL_SEGMENT = {
trueConnector: {
segmentIndex: 0,
segmentFraction: 0.1,
alignmentFocus: "Top",
},
falseConnector: {
segmentIndex: 0,
segmentFraction: 0.1,
alignmentFocus: "Left",
},
loopBackConnector: {
segmentIndex: 1,
segmentFraction: 0.15,
alignmentFocus: "Left",
},
loopContinueConnector: {
segmentIndex: 0,
segmentFraction: 0.45,
alignmentFocus: "Top",
},
goBackToConnector: {
segmentIndex: 9,
segmentFraction: 0.8,
alignmentFocus: "Left",
}
};
FlowDiagramConstants.LINK_ADD_BTN_SEGMENT = {
normal: {
segmentIndex: 0,
segmentFraction: 0.3,
},
trueConnector: {
segmentIndex: 0,
segmentFraction: 0.45
},
falseConnector: {
segmentIndex: 1,
segmentFraction: 0.3,
},
loopContinueConnector: {
segmentIndex: 0,
segmentFraction: 0.7,
},
decisionConnector: {
segmentIndex: -1,
segmentFraction: 0.6,
addToEndSegmentLength: 45,
hideToArrow: true
}
};
FlowDiagramConstants.LINK_ADD_BTN_VISIBILITY = {
forLoopEmptyEnd: "always",
forLoopWithChildEnd: "onHover",
forLoopLoopback: "never"
};
FlowDiagramConstants.FLOW_LOGIC_TYPES = {
ASSIGNSUBFLOWOUTPUTS: "ASSIGNSUBFLOWOUTPUTS",
CATCH: "CATCH",
DECISION: "DECISION",
DECISIONBLOCK: "DECISIONBLOCK",
DOUNTIL: "DOUNTIL",
ELSE: "ELSE",
ELSEIF: "ELSEIF",
END: "END",
FOREACH: "FOREACH",
PATHBROKEN: "PATHBROKEN",
ENDLOOP: "ENDLOOP",
ENDDOLOOP: "ENDDOLOOP",
ENDIF: "ENDIF",
ENDPARALLEL: "ENDPARALLEL",
BEGINNINGPARALLEL: "BEGINNINGPARALLEL",
ENDDECISION: "ENDDECISION",
GETFLOWOUTPUTS: "GETFLOWOUTPUTS",
IF: "IF",
PARALLEL: "PARALLEL",
PARALLELBLOCK: "PARALLELBLOCK",
RUNDYNAMICFLOW: "RUNDYNAMICFLOW",
RUNWORKFLOW: "RUNWORKFLOW",
SETFLOWVARIABLES: "SETFLOWVARIABLES",
TIMER: "TIMER",
TOP_LEVEL_CATCH: "TOP_LEVEL_CATCH",
TOP_LEVEL_TRY: "TOP_LEVEL_TRY",
TRY: "TRY",
UPDATEFLOWTEMPLATE: "UPDATEFLOWTEMPLATE",
GOBACKTO: "GOBACKTO",
ONE_TO_ONE: {
TIMER: "TIMER",
GETFLOWOUTPUTS: "GETFLOWOUTPUTS",
RUNDYNAMICFLOW: "RUNDYNAMICFLOW",
RUNWORKFLOW: "RUNWORKFLOW",
SETFLOWVARIABLES: "SETFLOWVARIABLES",
ASSIGNSUBFLOWOUTPUTS: "ASSIGNSUBFLOWOUTPUTS"
},
ONE_TO_MANY: {
PARALLEL: "PARALLEL",
DECISION: "DECISION"
}
};
Sys ID
6795db0077d13010b2b4ddd9cf5a998f