| | | Senior Member
       
Group: Forum Members Last Login: Friday, March 14, 2008 Posts: 9, Visits: 26 |
| | For the "Update" to run on the Script Action Code editor without getting an error, I had to enter the Reference to my new C#.NET DLL as follows: References Assembly Path SkeltaScript1 C:\\dev\\SkeltaWF\\SkeltaScript1\\bin\\Debug\\ Yes that is double-slashes, and yes that trailing double slash is required. The Code editor validates that ref, and validates the Class and Function its calling, so all seems fine. The script code is trivial: SkeltaScript1.SkeltaScript1 loSkeltaScript1 = new SkeltaScript1.SkeltaScript1(); loSkeltaScript1.LocalLog("Called from WFLaunch Script1"); return "";
However, at runtime, I get the error (in the Skelta Logger Console): (Unforntunatly it doesn't show the Path its trying to open): (I also tried running it from an unrelated .NET project and it ran fine). ! - Error while running the Action or Handling the event- Script1 for ExecutionD etailsID=63, - Exception has been thrown by the target of an invocation., Inner Exception :Could not load file or assembly 'SkeltaScript1, Version=1.0.0.0, Cult ure=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified., ApplicationName - SkeltaEvalRepo2, WorkflowName - WFLa uncher, ExecutionId - 31, ExecutionDetailsId - 63, Module - C:\WINDOWS\assembly\ GAC_MSIL\Workflow.NET.NET2\3.5.0.0__c932f724c984e915\Workflow.NET.NET2.dll, File Name - RunTime.cs, Source - at Workflow.NET.PropertyTypes.PropertyMemo.x48be1 481a42c19e3(Int32 x99bbe3a0831cff64, Int32 x8e463abe161afc8c, Context _x0f7b23d1 c393aed9, Action xab8fe3cd8c5556fb, String x04c44b8a1c5eaf5e) at Workflow.NET.ActionHandler.ScriptHandler.Run(Int32 ExecutionID, Int32 Exec utionDetailsId, Context CurrentContext, Action CurrentAction, String InlinkOutpu t, Boolean Retry, String& Output) at Workflow.NET.Engine.RunTime.PerformActionThread(Object Params), pauyoupc3, Process - WFEngine.NET2, 3/11/2008 4:54:07 PM |
| | | | Supreme Being
       
Group: Forum Members Last Login: Thursday, July 31, 2008 Posts: 145, Visits: 619 |
| Hi, The Script-Activity executes the Run method. Hope the code is written within Run method. When you give assembly path you need to include the name of assembly also. E.g. C:\\dev\\SkeltaWF\\SkeltaScript1\\bin\\Debug\\ SkeltaScript1.dll Hope this helps.
Regards, BiNo |
| | | | Senior Member
       
Group: Forum Members Last Login: Friday, March 14, 2008 Posts: 9, Visits: 26 |
| | I understand about the Run function, I had wired that in first, but then tried a simpler one in case that was the problem. When I add the dll name to the end of the Assembly Reference: C:\\dev\\SkeltaWf\\SkeltaScript1\\bin\\Debug\\SkeltaScript1.dll When I click "Update" in the "Code" window, it gives me the error: Metadata file c:\dev\SkeltaWf\SkeltaScript1\bin\Debug\SketaScript1.dllSkeltaScript1.dll could not be found- Line Number = 0 And it won't save any code changes. It also will not "Publish" nor "Validate" when its entered that way, I get roughly the same error. Which is how I came to the conclusion that the Assmebly Reference did NOT want the dll file name, just the Path. However, I tried leaving the "References" column blank - and it accepts that. After publish, I still get this error when running that workflow: i - **** Error while executing GetProcessedValue : System.Reflection.TargetInvoc ationException: Exception has been thrown by the target of an invocation. ---> S ystem.IO.FileNotFoundException: Could not load file or assembly 'SkeltaScript1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencie s. The system cannot find the file specified. File name: 'SkeltaScript1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ' at Script1.Run(Int32 ExecutionId, Int32 ExecutionDetailsId, Context ctx, Acti on action, String inlink) |
| | | | Supreme Being
       
Group: Forum Members Last Login: Wednesday, June 04, 2008 Posts: 131, Visits: 423 |
| Hi, Sorry for the delayed response. We were able to replicate this scenario. The team is working on the fix.
For calling components outside skelta and also to do complicated operations it's recommend to use Custom Activity.
regards,
Moderator |
| |
|
|