Workflow Soluiton

 View Only
  • 1.  Could not load file or assembly 'Newtonsoft.Json

    Posted Aug 31, 2015 06:15 AM

    I have a couple of components in a workflow project that are custom from the Rest Generator.  The web service they communicate with returns a json formatted result.  I have three Rest components generated from the one integration library.

    These (the workflow and the components) work well in debug but have problems once published.  I see exceptions as per the below.  Sometimes restarting workflow solves the problem but not always.

    Has anyone seen this before?  The file C:\Program Files\Symantec\Workflow\Shared\lib\Newtonsoft.Json.dll is present and the workflows work just fine in debug.

     

     

    System.Exception: Execution Engine Exception  ---> System.Exception: Execution Exception ---> System.Exception: exception component created:  ---> LogicBase.Framework.BusinessRuleException: The critical error failed execution on component [Name of my Component] : Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. :    at LogicBase.Core.Generators.Components.RestBaseComponent.ReadResponseJson(PathDefinition path, Stream stream)
        at LogicBase.Core.Generators.Components.RestBaseComponent.ReadResponseContent(IData data, PathDefinition path, Stream stream)
        at LogicBase.Core.Generators.Components.RestBaseComponent.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.ExceptionComponentDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
        --- 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.Components.Default.Workflow.WaitOnExternalEvent.HandleEscalation(String taskID, String workflowID, IData data, Int32 level)
    
    

     

     

    The only other thing I have noticed is a warning when I open this project of "Duplicate Class Loaded: Automation.RestBaseComponent" which auto-closes.

    Workflow 7.6..4383.487

     

     



  • 2.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted Sep 01, 2015 03:54 PM

    Ok thanks - adding that library to my integration project seems to have removed the error.



  • 3.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted Sep 02, 2015 03:41 AM

    It's an issue with Workflow and which folder it is looking at for the library.

    You need to add the library (Newtonsoft.Json.dll) to your Project, like you would a Custom INT.

    Or just copy it to the bin directory of the Project (release)

    There's a Support Ticket raised (ET 3814272).

    Workflow 7.6 Point Fix rollup



  • 4.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted Nov 04, 2015 02:47 PM

    Alex did your support ticket ever resolve this?  I'm finding adding that dll to every project to be rather annoying.



  • 5.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted Nov 05, 2015 03:48 AM

    The ticket is still open, there's still a POA for it with Engineering.



  • 6.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted May 05, 2016 02:30 PM

    Alex did your ticket ever get solved?



  • 7.  RE: Could not load file or assembly 'Newtonsoft.Json

    Posted May 06, 2016 03:49 AM

    Nothing yet, I think with there being a workaround more pressing issues are being dealt with first.

    Workaround: Add this library to project before publishing, in the Libraries tab of the project check Copy Local and check on Publish, then re-publish the project. It will create bin directory inside the deployed project folder along with dll.

    I've not tested this with v8.0, have you had a chance?



    • 8.  RE: Could not load file or assembly 'Newtonsoft.Json

      Posted May 09, 2016 03:52 AM

      I've not had a chance with WF 8 either just yet - here's hoping though!