cancel
Showing results for 
Search instead for 
Did you mean: 

MTOM integration

flefoll
Champ in-the-making
Champ in-the-making
Hi,

Here is my issue,
I need to plug Alfresco storage mechanism (inbound/update triggers) with a messaging system (which may have his own process lifecycle, and will change Alfresco node aspect remotely and asynchronously…).

Here is my dilemma,

I didn't found an easy way to create a .js script to do external calls (ideally RESTs…),
in order to simply advise inbound/update events to a third system, and handling the processes externally.

Is it possible to do it by Javascript ??
On example of Web Script Backed by Java classes, the backed classes are used by a webscript, not by a javascript (as it is executed on inbound/outbound/update trigger). Is it possible to use the same logic/dev on javascript level ?

Do somebody have an example/link of the code I need to produce ?

Thanks in advance for your inputs,

Francois
2 REPLIES 2

rogier_oudshoor
Champ in-the-making
Champ in-the-making
What you should do, is create your own JavaScript extension class in Java. Basically, you create a Spring bean (much like you would when you create a Java class to back a webscript) as defined in http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Adding_Custom_Script_APIs. You can then call this the methods from this class from within your Rule script.

flefoll
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the answer,
Indeed it seems to be where I have to code…
I may investigate jBPM as well, but workflows seem to be an hammer regarding my tiny need.

Great thanks for your reply,

Francois