Hi, I’m using external DLLs in Data and Method directives.
I want to pop a simple BPM data form in a Post-Processing method directive.
I found that MethodDirectiveBase has a method BpmDataFormProcess(string formId) which call the form but the problem is that it takes a Session and method parameters.
public abstract class MethodDirectiveBase<TCtx, TSession, TParam> : DirectiveBase<TCtx, TSession, TParam>
where TCtx : IceContext
where TSession : Session
where TParam : MethodParameters
I assume that I can create a class for TParam which inherit from MethodParameters but I don’t know how to get the session. Is it even possible from an external dll?
Generally this causes dependency issues and it can be a bit of a nightmare to implement. I’ve never called a BPM form from an external DLL though I suspect you could perhapse… I’ll do some investigating however again why go with an external DLL?
You should be able to do everything you need inside a regular BPM screen, are you invoking this external DLL from your BPM?
Yes I do Invoke an external dll in my BPM. I do it for every directive I’m hooked up to.
I do realize it is a nightmare to implement that why all I do is making a call to a secure API which does everything needed through WCF which means I very rarely redeploy new versions of the external DLL.
I recently discovered the BPM data form and I realized it could be interesting to use it sometimes to simplify the implementation in the server which modifies Epicor data.
In order to call a BPMDataForm I believe you’ll have to implement CustomizationBase in your class which can very complex. One thing you can do, is call the BPM data form from inside the BPM and then go back to your external DLL with the results.
I too have discovered the BPM form… I went along to even customize the form to add some code but … Did not find how to make sure the customized version is used by the users… as we do setup our customized forms in menu maintenance…
I thought of that but didn’t give it a try yet thinking it might not be possible. I though with BPMs it’s either you use an External dll which has the same signature that the BPM method itself or you make the flow.
Does that mean I have to change the signature or I keep it as it is and just try to get the answers from callContextBpmData which I assume require also an inheritance but easier to implement.
I do not have cutomization but thats what @josecgomez is talking about. You can always create a basic flow with the designer and than go check in Epicor folder the source code to see exactly how it is used!