cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to apply a ModelingRule

agiovannetti
Super Contributor

Ciao,  

to apply a ModelingRule to an OrganizationalProcess, this VB code:

wellFormed = oMegaObject.applyRule(oRule)

 

works fine, I would like to write in java something like this:

Boolean aBool = anOrganizationalProcess.callFunction("ApplyRule", aRule);

 Any advice?

 

4 Replies

This code seems to work fine:

 

Object anObject = anOrganizationalProcess.invokeFunction("ApplyRule", aRule);

 

Thanks to http://community.mega.com/t5/Technical-Product/Refresh-documents-using-java-api/m-p/1601/highlight/t...

Just to add a note, this code:

Object anObject = anOrganizationalProcess.callFunction("ApplyRule", aRule);

 

throws the eception: MEGA Error 80070057.

What am I doing wrong?

Andrea

agiovannetti
Super Contributor

Hi Jerome,

thanks for your reply, but I am trying to re-write a VB macro in java.

I would like to apply a ModelingRule to a MegaObject and check if it is valid.

How could I do that?

Andrea G.

 

jhorber
MEGA
MEGA

Hello agiovannetti

 
It is possible to call a VB Script macro from your Java code.
See this existing post:

http://community.mega.com/t5/Technical-Product/Website-post-generation-script-with-Java-macro/m-p/17...

Jerome