Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Problem with running method from orchestration
- This topic has 4 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
December 12, 2005 at 3:36 PM #12514
Hello,
I have a simple orchestration with 3 shapes, a Receive, Send and an Expression shape. Also I got a class with a simple method that just writes a line to a text file. The class has a strong name and I installed it into GAC with gacutil. Also I’ve added the reference of the class.
The problem is that when I run the orchestration, I put some file in the input folder (the pipelines are passthru), the file disappears and that’s it, no further actions. The file does not appear in the output folder and there are no any actions from my method, also there are no errors or exceptions in Administration Console.
But if I delete the Expression shape, leaving just Receive and Send shapes, the file is sent to output folder.Here is the code from Expression shape:
MailVar = null;
MailVar.TestFunc(\”Launch.\”); //MailVar is the variable of my custom classAnd here is the code of my method:
public void TestFunc(string launcher)
{
FileStream fout;
fout = new FileStream(@\”C:\\BTalk\\MailTest\\new.txt\”, FileMode.Create);
StreamWriter fstr_out = new StreamWriter(fout);
fstr_out.Write(launcher);
fstr_out.Flush();
fstr_out.Close();
}Does anyone have an idea why it’s not working ?
It would be very nice, if anyone can help me.Thanks a lot.
Roman. -
December 13, 2005 at 7:11 AM #12515
Thanks for the answer Greg,
I tried the following:
MailVar = new <MyNamespace>.<MyClass>();
MailVar.TestFunc(\”Launch.\”);But, unfortunatelly, the same situation with no result.
What could it be?Roman.
-
December 13, 2005 at 3:24 PM #12516
Yes, the class is marked as serializable.
And thanks for idea about using static methods, everything worked fine!
Thank you very much Greg.
-
December 12, 2005 at 7:18 PM #12517
Try this in the expression shape:
MailVar = new <Your Namespace>.MailVar();
MailVar.TestFunc(\”Launch.\”); //MailVar is the variable of my custom class-
December 13, 2005 at 9:47 AM #12518
Is your .NET class marked as serializable?
If not is the expression shape inside an atomic scope?Are you submitting more than one message at a time or does the new.txt file already exist?
What error message results in the event log?
Have you considered a static method, i.e. no object instance required
and expression shape code should be:
<yournamespace>.<yourclass>.TestFunc(\”Launch.\”);Greg
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.