How to call a ClassMethod in Business Process
In a Business Process (Ens.BusinessProcessBPL), how can you correctly call a classMethod?
I know we can call it in a block <code> :.png)
Or in a <assign>
.png)
Are there other ways and/or good practices?
Thanks
Corentin
Comments
To call a class method the syntax is:
##class(ClassName).MethodName(params)
I aware of that. What I want to is if there is an other way to call a classmethod in a BP
The conventional method is with an <assign> action. If the classmethod has output or byref variables in its signature, I think a <code> action would be appropriate (I've never tried to set context variables by reference in an <assign>).
This likely goes without saying, but context variables remain available/usable in a code action.
Thank you
Do you think it can be a good idea to submit a proposition into InterSystems Ideas to have a specific bloc activity to call classMethod?
I don't personally see the need, and I think InterSystems has better things to spend their time on 😁
I agree with Jeffrey, it's not something necessary, because <assign> and <code> are calling the methods without issues.