Workflow Soluiton

 View Only
  • 1.  Date pickers and Calculating new dates

    Posted Nov 21, 2014 05:02 PM

    We are building a process that will allow our staff to calculate when certain activities for each job should be completed.

     

    What we have is a webform where the user enters the customer number it then searches through our system and recoveres some customer info as well as a start date and some benchmark dates.

    We use the start date as level 1.  At level 2 it is Start date + Bench mark date A = Level2Complete, At Level3 it is Level2Complete + Bench mark date B.

     

    To Do this we were going to use date pickers in a dynamic update panel. The reason was if Any Dates fall during Xmas or during other times of the year the user can pick a new date from the date picker and it will recalculate the others with a simple refresh button. Am I right in my thinking?

     

    To calculate each DAte we put in a date picker component shut off the start on today box. Used a dynamic model  and the Add DAys component to select the Previouse level completed date. (THis was under This Form data)

    Meeting1.jpg shows the data picker and meeting1Calc shows the Add days component inside the Dynamic model.

     

    When I run it I get an exception trigger of 

     

    LogicBase.Components.FormBuilder.FormBuilderComponent

    Form Builder

    95b9aa97-7105-11e4-a9bd-005056a50013

    System.Exception

    Execution Engine Exception

     

    System.Exception: Execution Engine Exception ---> System.Exception: Execution Exception ---> System.NullReferenceException: Object reference not set to an instance of an object. at LogicBase.Components.Default.DateHandling.AddDays.Run(IData data) at LogicBase.Core.ExecutionEngine.MultiPathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp) --- End of inner exception stack trace --- at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue) --- End of inner exception stack trace --- at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.ExecuteComponent(IData data, IOrchestrationComponent component) at LogicBase.Core.Models.EmbeddedDecisionModel.EmbeddedDecisionModelExecutionEngine.Run(IData data) at LogicBase.Core.Data.DataTypes.VariableOrValueDataType.GetValue(IData data) at LogicBase.Core.Data.DataTypes.VariableOrValueDataType.GetValue[T](IData data) at LogicBase.Components.FormBuilder.DatePickerComponentRenderer.Load() at LogicBase.Components.FormBuilder.Core.FormComponentRenderer`1.LogicBase.Components.FormBuilder.Core.IFormComponentRenderer.Load() at LogicBase.Components.FormBuilder.FormBuilderComponentRenderer.Load() at LogicBase.Components.FormBuilder.FormBuilderComponent.LogicBase.Core.Models.Dialog.IAspNetPageComponent.Load(ComposerForm page) at LogicBase.Core.Models.Dialog.ComposerForm.OnLoad(EventArgs e) 

     

     

    Thank you.



  • 2.  RE: Date pickers and Calculating new dates

    Posted Nov 21, 2014 05:07 PM

    the first thing i'd do is initialize your date variable prior to the form component in an Initialize Data component, so you can use the real variable instead of the "this form" variable, and then see if that gets you any farther.  



  • 3.  RE: Date pickers and Calculating new dates

    Posted Nov 21, 2014 05:18 PM

    Sorry I have never used that component before so not sure how to use it or where to set it.

    I included two more screen shots one called process is the whole process right now

    The second dates is what the screen looks like where wer are using the dynamic panels.

     



  • 4.  RE: Date pickers and Calculating new dates

    Posted Dec 04, 2014 02:00 PM

    My apologies for the delayed response - I attempted to reproduce the issues you're seeing with the dates and dynamic recalculation, and i ran into lots of issues with it, just like you did.  normally the way I try to handle dates like this is to use a subdialog to set the date (like with the calendar component).  inside the subdialog, after setting one date, you can do the date calculations to set other date values and then refresh the parent page.  Let me know if you're still having issues with this and I'll put together a demo package for you.