LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Dynamic parameter to enable and disable nodes

    Employee
    Posted 05-09-2016 09:45

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dtigue

    Hi,

    I am trying to provide a dynamic solution to the following problem.
    I am running a loop in my graph so that it iterates over each calendar day.
    When it gets to the last day of the month the data contains a field called MonthEnd which is set to true, otherwise it is set to false.
    When it is set to false, there will be zero records and I do not want the month end process to be enabled, but I need the loop to continue running, therefore I have set up a bypass node to facilitate this.
    The issue I am having is that I cannot dynamically switch on/off the {{^Enabled^}} parameter, based on a field, or based on the Record Count.
    I have tried with meta check, but this doesn't disable/enable.
    Any suggestions gratefully received - see example nodes below demonstrating what I'm after.

    node:Static_Data
    bretype:core::Static Data
    editor:sortkey=5594e62503a37792
    output:@40fe6c55598828e5/=
    prop:StaticData=<<EOX
    color:string, id:int,type:string,rand:int,junk:string,MonthEnd:b oolean
    Red,1,primary,27959,okay,false
    Green,2,primary,7138,"""Let's Go"", he said",false

    EOX
    editor:XY=200,390
    end:Static_Data

    node:If_Record_Count_from_previous_node_is_greater _than_0_or_MonthEnd_is_True_then_enable_and_run_th is_node_otherwise_disable
    bretype:core::Filter
    editor:Label=If Record Count from previous node is greater than 0 (or MonthEnd is True), then enable and run this node, otherwise disable
    editor:sortkey=5730bbb0669a2a9d
    input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    editor:XY=460,270
    end:If_Record_Count_from_previous_node_is_greater_ than_0_or_MonthEnd_is_True_then_enable_and_run_thi s_node_otherwise_disable

    node:If_Record_Count_from_previous_node_is_equal_t o_0_or_MonthEnd_is_False_then_enable_and_run_this_ node_otherwise_disable
    bretype:core::Filter
    editor:Label=If Record Count from previous node is equal to 0 (or MonthEnd is False), then enable and run this node, otherwise disable
    editor:sortkey=5730bba761a81c47
    input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    editor:XY=460,460
    end:If_Record_Count_from_previous_node_is_equal_to _0_or_MonthEnd_is_False_then_enable_and_run_this_n ode_otherwise_disable

    node:Bypass
    bretype:core::Bypass
    editor:sortkey=5730bb50405d20fb
    input:5730bbab2d35073d/out1=If_Record_Count_from_previous_node_is_greater _than_0_or_MonthEnd_is_True_then_enable_and_run_th is_node_otherwise_disable.40fd2c7420761db6
    input:5730bbb61e8f0276/out12=If_Record_Count_from_previous_node_is_equal_ to_0_or_MonthEnd_is_False_then_enable_and_run_this _node_otherwise_disable.40fd2c7420761db6
    output:@40fd2c7436717256/=
    editor:XY=660,370
    end:Bypass


  • 2.  RE: Dynamic parameter to enable and disable nodes

    Employee
    Posted 05-09-2016 10:48

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    The Bypass node does not operate with clocks.. it merely selects one input or another IF the first pin is NOT ENABLED.
    And, you can't turn ENABLED off and on with data from the stream.

    However:
    The attached graph may do what you wish.
    The problem is that you have four conditions to account for - Data/Nodata plus Monthend/NotMonthend.
    To keep it simple for now, I've only included the Monthend condition here.. you'd have to enhance this to deal with the NoData situation.
    Likely, you would have to have four of the lookup nodes to deal with all four conditions.

    The "Fake Data" node here adds a record to the main input such that "something" will progress thru the rest of the logic.
    You can/should remove that record in the downstream processing.
    Attachments:
    Path Switch.brg


  • 3.  RE: Dynamic parameter to enable and disable nodes

    Employee
    Posted 05-10-2016 01:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dtigue

    Hi stonysmith,

    Thanks for this. I am happy for it to work on just the MonthEnd/NotMonthEnd condition, however my main issue with this solution is that my MonthEnd takes a long time to run (approx 30mins, even with zero records), therefore it would be much more efficient for the MonthEnd process not to run at all when it is not MonthEnd.
    This would speed up the looping mechanism considerably. Do you have any suggestions as to how I might go about this?

    Thanks


  • 4.  RE: Dynamic parameter to enable and disable nodes

    Employee
    Posted 05-12-2016 02:38

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dtigue

    Bumping this. Anyone have any ideas on how to go about this?


  • 5.  RE: Dynamic parameter to enable and disable nodes

    Employee
    Posted 10-05-2016 10:37

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    I know it's a few months later but this thread might of use.