Workflow Soluiton

 View Only
  • 1.  Failing to regenerate resources dll

    Posted Sep 10, 2014 02:07 PM

    We had a problem for quite some time at my place.  We had consultant on the problem and also Symantec but we never found the solution and always used a workaround.  Today I have found the root cause of the problem so i'm sharing the info in case some ever search for it.

    While coding with workflow you sometimes need to regenerate Symantec.Components.Generated7.Altiris.Resource because there was some custom resource type created in Altiris.  At our place we have like 1000 error lines while trying to regenerate that component, errors about invalid argument for output.

    What I found out spying through the process is that some c# source code is generated then compiled in temp and I found the error.

    You can't have a resource type named Array and probably other reserved words because they interfere with namespace definition in the source code and create havok in the compile job.  Renaming the resource type Array to anything else solved the problem.

     

    Have a good day and I hope it will helps someone someday.



  • 2.  RE: Failing to regenerate resources dll

    Posted Sep 11, 2014 07:23 AM

    Typically when you have this issue, Workflow will write the C# to the logged-in user's temp directory. For the resource library, it'll generally be a largish .tmp file :) Securing the .tmp file and getting it to support is the best way to get it solved quickly.

    If you're handy with Visual Studio, you can actually get to the bottom of the issues yourself. It involves opening a new C# class library, adding references to Core/Framework/generated resource library, and renaming the .tmp file to a .cs file and adding it to your project. Attempt to compile, and you should duplicate the errors you see in the Workflow GUI. But with Visual Studio, you can jump to the line quickly and see what the problem is.

    (Fair disclosure) This is how I used to solve/troubleshoot the issues. Sometimes the fix required fixes to the template. Other times, we had to specifically block ceratin resources because Workflow can't support the type of inputs/outputs defined.



  • 3.  RE: Failing to regenerate resources dll

    Posted Sep 11, 2014 08:26 AM

    Thanks for the comment reecardo.  In my case I did the troubleshoot the proper way by talking to Symantec with a case etc a few years back... over time we had multiple senior consultant from Symantec partners looking into the problem and none were able to provide a fix.  Since we had a workaround to generate the dll I did not care too much about the issue until yesterday when the problem became a pain on an urgent project so I worked on it myself, opening source codes etc.