06-04-2015 12:24 PM
Hi,
I need to call the "ExportStructureToFS" operation from an event listener in order to trigger a scheduled export mys documents.
I found this explanation about how to call operations from java code, but I can't get the AutomationService and OperationContext injected as suggested in the example.
I use this declarations:
@Context
protected AutomationService service;
@Context
protected OperationContext context;
Both service and context end being set to null using this technique.
What's wrong ?
Thanks
06-04-2015 01:09 PM
Hello,
06-04-2015 01:50 PM
Hi,
06-04-2015 05:06 PM
I've just read about the @context annotation and it seems to precisely be out of context here. If i'm right dependency injection is not available in this case except for unit testing.
06-05-2015 11:05 AM
Dependency injection via the @context annotation works calling one operation from another.
In that case using:
AutomationService automationService = Framework.getService(AutomationService.class);
To get the service implementation
And
automationService.run(new OperationContext(), "ExportStructureToFS", parameters);
Solved my problem
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.