7 Replies Latest reply on Jun 19, 2013 11:01 AM by hk19

    Replication from an OSGI bundle - help

    fraserfcc

      I am an OSGI newb!

       

      I create a custom WorkflowProcess that is called from a WorkflowLauncher when a certain node gets created on the Author instance.  The WorkflowProcess needs to replicate the node structure onder this node to the publisher.  

       

      I am having problems using the Replicator from the WorkflowProcess in the OSGI bundle.  I am not about to instantiate an instance of  com.day.cq.replication.Replicator.  I have tried using the @Reference annotation, but at runtime the replicator is null.  I have seen suggestions of using the Sling on the front end but that is not what I am looking for. 

       

      So my questions are:

      1.) How do I get an instance of  com.day.cq.replication.Replicator from inside a WorkflowProcess (WorkflowSession)?

      2.) Can I use Sling in the bundle?

      3.) Is there an easier way to do this?

      4.) Can I programmatically connect to the Publish server from my WorkflowSession and create the nodes with jcr?

       

      Thanks.