cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply a ModelingRule

Solved
Contributor

How to apply a ModelingRule

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?

 

Tags (2)
4 Replies
MEGA

Re: How to apply a ModelingRule

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
Highlighted
Contributor

Re: How to apply a ModelingRule

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.

 

Contributor

Re: How to apply a ModelingRule

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

Contributor

Re: How to apply a ModelingRule

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...