Monday, August 22, 2011

Method on BPM Object does not allow return value by default

When a method is created on the BPM object in obpm, it does not allow return value by default.

If a default statement is put in, you will see the error “the return statement only works in function”. Hmm… the method is not a function…

2 way to resolve it.

Select the method, on the right side, there is a properties tab. The “Return Type” is “No”, change it to the type you want to return. After that, obpm studio does not complain the “return” statement any more.

 

image

The other way is to add another argument and set its mode to be “out”. In this case, no need to write “return” statement, the return value should be set in the “out” argument.

No comments:

Post a Comment