Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to import/export tasks from different CQ instances?

Tags:

osgi

aem

sling

I have two instances of CQ and between them I want to be able to import/export tasks.

For example:

On instance 1 I can see all tasks by going to http://instance1/libs/cq/taskmanagement/content/taskmanager.html#/tasks/Delta

On instance 2 I can see all tasks by going to http://instance2/libs/cq/taskmanagement/content/taskmanager.html#/tasks/Delta

There might be some scenarios where I want to take all tasks from instance2 and add them as additional tasks into instance1 (on top of the tasks it may already have).

Is this possible to do?

like image 314
birdy Avatar asked Apr 19 '15 03:04

birdy


1 Answers

Yes, you can do this with Package Manager. The tasks are stored as nodes in the JCR repository, so you can create a package that filters the task nodes you want to migrate from one instance to another. For example, you could define a package with this filter definition to include all tasks:

/etc/taskmanagement/tasks

If you don't want all tasks, you may need to define the filter(s) more narrowly to pick only the ones you want to include.

For example:

/etc/taskmanagement/tasks/2015-05-04/Delta/TheTaskYouWantToMigrate

Use the browser when defining the filter to find the tasks you want to include.

enter image description here

See Working with Packages for details on using the Package Manager. This Tutorial also shows how to create the package and add filters. Once you've created a package with the filters for the tasks you want to include, then build the package and download it. On your other instance upload the package you built and install it. You will then see the tasks one your first instance replicated onto the second instance.

like image 143
Shawn Avatar answered Nov 07 '22 10:11

Shawn