Hi.
Instead of working in Metastorm designer we would prefer to use Visual Studio with Resharper. No matter how good Metastorm Designer is it will never be as good as he above pair.
We have no problems calling our custom libraries. I even succeeded modifying process variabels. I do it like that:
var ourCustomObject = new OurExternalLibrary.HaveAccessToVariables(Current.MapMBO);
ourCustomObjectb.SomeVariable = "some value";
in VS project we have
public class HaveAccessToVariables
{
private readonly IFieldAccess fieldAccess;
public HaveAccessToVariables(IFieldAccess fieldAccess)
{
this.fieldAccess = fieldAccess;
}
public Text SomeVariable
{
get { return (Text) fieldAccess.GetField("SomeVariable "); }
set { fieldAccess.SetField("SomeVariable ", value); }
}
}
and it works perfectly. But I would also like to be able to pass Mstm object to my custom lib. But I don't know how to do that or if it is even possible at all.
I just tried to add Mstm as constructor parameter
using Metastorm.Runtime.Core;
public HaveAccessToVariables(IFieldAccess fieldAccess, Mstm mstm)
{
this.fieldAccess = fieldAccess;
this.mstm = mstm;
}
It compiles and publishes fine but during runtime it throws that it can't find Metastorm.Runtime.Core.Stub dll (which I had to reference on my dev machine to have access to Mstm class)
public class DostepDoZmiennych
{
private readonly IFieldAccess fieldAccess;
public Text bsPolisaNr
{
get { return (Text) fieldAccess.GetField("bsPolisaNr"); }
set { fieldAccess.SetField("bsPolisaNr", value); }
}