BizTalk Server General - Custom Functoid - intermitment toolbar image

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2005 > Custom Functoid - intermitment toolbar image





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Custom Functoid - intermitment toolbar image
Gavin G. Jones

2005-02-11, 7:58 am

I'm using BizTalk 2004 SP1 on a Win2k server machine.

1) I've compiled the Custom Functoid example from the SDK.

2) I've copied the CustomFunctoid.dll into the BizTalk mapper directory and
installed into the DAC.

3) I've gone into Visual Studio 2003.net and Add/Remove Items on the toolbar
pane, clicked Reset and the functoid bitmaps appear under the String
Functoids heading bar.

Problem 1: If I drag any of the custom functoids onto the mapping canvas I
get a white block instead of the bitmap image.

I get the same problem in my own functoid.

This can't be a resource identity problem because they appear in the
toolbar.

People are getting similar problems reported in NGs but there's no
solutions.

Problem 2: Even though the CustomFunctoid is in the BizTalk mapper
directory, everytime I close VS.net, and restart the functoids disappear - I
need to go back to step 3.

Thanks in advance,
Gavin G. Jones.






Michel Prévost

2005-02-11, 5:55 pm

> 2) I've copied the CustomFunctoid.dll into the BizTalk mapper directory
> and
> installed into the DAC.


Is it GAC? If this is the case, I would not do that. It is useless to put
the Functoid in the GAC since only BTS uses it. Furthermore, you will have
problems when you change the functoid code, because of this. Instead, add
Developer Tools/Mapper Extensions in the BTS config file, in the
privatePath.

"Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
news:OxZR7GEEFHA.1292@TK2MSFTNGP10.phx.gbl...
> I'm using BizTalk 2004 SP1 on a Win2k server machine.
>
> 1) I've compiled the Custom Functoid example from the SDK.
>
> 2) I've copied the CustomFunctoid.dll into the BizTalk mapper directory
> and
> installed into the DAC.
>
> 3) I've gone into Visual Studio 2003.net and Add/Remove Items on the
> toolbar
> pane, clicked Reset and the functoid bitmaps appear under the String
> Functoids heading bar.
>
> Problem 1: If I drag any of the custom functoids onto the mapping canvas
> I
> get a white block instead of the bitmap image.
>
> I get the same problem in my own functoid.
>
> This can't be a resource identity problem because they appear in the
> toolbar.
>
> People are getting similar problems reported in NGs but there's no
> solutions.
>
> Problem 2: Even though the CustomFunctoid is in the BizTalk mapper
> directory, everytime I close VS.net, and restart the functoids disappear -
> I
> need to go back to step 3.
>
> Thanks in advance,
> Gavin G. Jones.
>
>
>
>
>
>



Gavin G. Jones

2005-02-11, 5:55 pm

Any ideas on the 2 problems?

"Michel Prévost" <michel.prevost_TAKEOUTTHISPART@cactuscommerce.com> wrote
in message news:u5hJd9EEFHA.512@TK2MSFTNGP15.phx.gbl...
>
> Is it GAC? If this is the case, I would not do that. It is useless to put
> the Functoid in the GAC since only BTS uses it. Furthermore, you will have
> problems when you change the functoid code, because of this. Instead, add
> Developer Tools/Mapper Extensions in the BTS config file, in the
> privatePath.
>
> "Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
> news:OxZR7GEEFHA.1292@TK2MSFTNGP10.phx.gbl...
canvas[vbcol=seagreen]
disappear -[vbcol=seagreen]
>
>



Michel Prévost

2005-02-11, 5:55 pm

Problem 1: Would it be possible to see your functoid's constructor code?

Problem 2: Sorry, I don't know the answers for this one. Do they disappear
every time? Or when you perform a particular action?

"Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
news:%23CnyvkFEFHA.1564@TK2MSFTNGP09.phx.gbl...
> Any ideas on the 2 problems?
>
> "Michel Prévost" <michel.prevost_TAKEOUTTHISPART@cactuscommerce.com> wrote
> in message news:u5hJd9EEFHA.512@TK2MSFTNGP15.phx.gbl...
> canvas
> disappear -
>
>



Gavin G. Jones

2005-02-14, 7:51 am

Michel,

Here's the summarised functoid code:


using System;
using Microsoft.BizTalk.BaseFunctoids;
using System.Reflection;
using System.Text;

namespace IPC
{

public class DACFunctoid: BaseFunctoid
{
public DACFunctoid() : base()
{
this.ID = 6100; // Use a number larger than 6000

SetupResourceAssembly("IPC.DACFunctoidResources",
Assembly.GetExecutingAssembly());

SetName("DAC_NAME");
SetTooltip("DAC_TOOLTIP");
SetDescription("DAC_DESCRIPTION");
SetBitmap("DAC_BITMAP");

Category = FunctoidCategory.String;
HasVariableInputs = true;
SetMinParams(0);

SetScriptGlobalBuffer(ScriptType.CSharp,
GetGlobalFuncs());

OutputConnectionType = (ConnectionType.Element |
ConnectionType.Field);
AddInputConnectionType(ConnectionType.None);
AddInputConnectionType((ConnectionType.Element |
ConnectionType.Field));

AddScriptTypeSupport(ScriptType.CSharp);

}

protected override string GetInlineScriptBuffer(ScriptType
scriptType, int numParams, int functionNumber)
{
if (scriptType == ScriptType.CSharp)
{
StringBuilder builder = new StringBuilder();
//...
return builder.ToString();
}
else
{
return "";
}

}

public string GetGlobalFuncs()
{
return @"public string HTMLEncode(String s)
{
s = s.Replace( ""&"", ""&"" );
s = s.Replace( ""<"", ""&lt;"" );
s = s.Replace( "">"", ""&gt;"" );
s = s.Replace( ""\"""", """"" );
s = s.Replace( ""'"", ""'"" );
return s;
}";

}

}
}




"Michel Prévost" <michel.prevost_TAKEOUTTHISPART@cactuscommerce.com>
wrote in news:OSNP32FEFHA.936@TK2MSFTNGP12.phx.gbl:

> Problem 1: Would it be possible to see your functoid's constructor
> code?
>
> Problem 2: Sorry, I don't know the answers for this one. Do they
> disappear every time? Or when you perform a particular action?
>
> "Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
> news:%23CnyvkFEFHA.1564@TK2MSFTNGP09.phx.gbl...
>
>
>


Ed

2005-02-14, 5:50 pm

Same problem here. I've GAC'd and unGAC'd them and it doesn't make a
difference. One thing I've noticed that if I have 4 functoids in a dll, it
shows 3 of them. If I add 4 more, it shows 7 of them. Possibly the code
that loads them isn't looping through properly to locate them all???

"Michel Prévost" wrote:

> Problem 1: Would it be possible to see your functoid's constructor code?
>
> Problem 2: Sorry, I don't know the answers for this one. Do they disappear
> every time? Or when you perform a particular action?
>
> "Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
> news:%23CnyvkFEFHA.1564@TK2MSFTNGP09.phx.gbl...
>
>
>

Michel Prévost

2005-02-14, 5:50 pm

I think your problem is with the naming of the resource file and the way you
refer to it in the SetupResourceAssembly call.

See the CustomFunctoid project in the SDK samples, under SDK/Samples/XML
Tools (if you don't see XML Tools, you need the SDK refresh. Look at
ms-help://BTS_2004/SDK/htm/ebiz_sdk_samples_xmltools_nkfu.htm for the link
to the refesh).


"Gavin G. Jones" <gavin@nospamgjit.com> wrote in message
news:Xns95FD8072CF425gavingjitcom@207.46.248.16...
> Michel,
>
> Here's the summarised functoid code:
>
>
> using System;
> using Microsoft.BizTalk.BaseFunctoids;
> using System.Reflection;
> using System.Text;
>
> namespace IPC
> {
>
> public class DACFunctoid: BaseFunctoid
> {
> public DACFunctoid() : base()
> {
> this.ID = 6100; // Use a number larger than 6000
>
> SetupResourceAssembly("IPC.DACFunctoidResources",
> Assembly.GetExecutingAssembly());
>
> SetName("DAC_NAME");
> SetTooltip("DAC_TOOLTIP");
> SetDescription("DAC_DESCRIPTION");
> SetBitmap("DAC_BITMAP");
>
> Category = FunctoidCategory.String;
> HasVariableInputs = true;
> SetMinParams(0);
>
> SetScriptGlobalBuffer(ScriptType.CSharp,
> GetGlobalFuncs());
>
> OutputConnectionType = (ConnectionType.Element |
> ConnectionType.Field);
> AddInputConnectionType(ConnectionType.None);
> AddInputConnectionType((ConnectionType.Element |
> ConnectionType.Field));
>
> AddScriptTypeSupport(ScriptType.CSharp);
>
> }
>
> protected override string GetInlineScriptBuffer(ScriptType
> scriptType, int numParams, int functionNumber)
> {
> if (scriptType == ScriptType.CSharp)
> {
> StringBuilder builder = new StringBuilder();
> //...
> return builder.ToString();
> }
> else
> {
> return "";
> }
>
> }
>
> public string GetGlobalFuncs()
> {
> return @"public string HTMLEncode(String s)
> {
> s = s.Replace( ""&"", ""&"" );
> s = s.Replace( ""<"", ""&lt;"" );
> s = s.Replace( "">"", ""&gt;"" );
> s = s.Replace( ""\"""", """"" );
> s = s.Replace( ""'"", ""'"" );
> return s;
> }";
>
> }
>
> }
> }
>
>
>
>
> "Michel Prévost" <michel.prevost_TAKEOUTTHISPART@cactuscommerce.com>
> wrote in news:OSNP32FEFHA.936@TK2MSFTNGP12.phx.gbl:
>
>



Michel Prévost

2005-02-14, 5:50 pm

See my answer to Gavin.

Also, putting the functoid in the GAC makes the BT Mapper show you old code,
unless you unGAC and reGAC. Again, there is no point in GACing the functoid
because only BTS uses them.

"Ed" <Ed@discussions.microsoft.com> wrote in message
news:D5A32D78-8DBC-46C2-9B99-436E0AC50325@microsoft.com...[vbcol=seagreen]
> Same problem here. I've GAC'd and unGAC'd them and it doesn't make a
> difference. One thing I've noticed that if I have 4 functoids in a dll,
> it
> shows 3 of them. If I add 4 more, it shows 7 of them. Possibly the code
> that loads them isn't looping through properly to locate them all???
>
> "Michel Prévost" wrote:
>


Gavin G. Jones

2005-02-16, 5:50 pm

Michel,

I get the exact same problem with the Scott Woodgate's CustomFunction SDK.

Like my example, I see them in the Toolbar, but the appear as white blocks
on the mapping canvas.

The problem exists if I use the GAC or don't use it.

I'm using Windows 2000 Server hosting both development and runtime.

Regards,
Gavin.

"Michel Prévost" <michel.prevost_TAKEOUTTHISPART@cactuscommerce.com> wrote
in message news:%23AFvx7tEFHA.2756@TK2MSFTNGP15.phx.gbl...
> See my answer to Gavin.
>
> Also, putting the functoid in the GAC makes the BT Mapper show you old

code,
> unless you unGAC and reGAC. Again, there is no point in GACing the

functoid
> because only BTS uses them.
>
> "Ed" <Ed@discussions.microsoft.com> wrote in message
> news:D5A32D78-8DBC-46C2-9B99-436E0AC50325@microsoft.com...
code[vbcol=seagreen]
code?[vbcol=seagreen]
to[vbcol=seagreen]
will[vbcol=seagreen]
Instead,[vbcol=seagreen]
the[vbcol=seagreen]
String[vbcol=seagreen]
the[vbcol=seagreen]
mapper[vbcol=seagreen]
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com