cancel
Showing results for 
Search instead for 
Did you mean: 

Posting Custom Activity to Dashlet

dwinfield
Champ in-the-making
Champ in-the-making
I've created a new content section in share, and wanted the creation/updating and deletion tasks to show up in the activities dashlet.  No big deal, it's easy to see how the links content section does it.

links.put.json.js has the following line

activities.postActivity("org.alfresco.links.link-updated", siteId, containerId, jsonUtils.toJSONString(data));

If you search for that org.alfresco.links string you see they're all listed in  activity-list.get.properties with
org.alfresco.links.link-created={0} link created by {1}
org.alfresco.links.link-updated={0} link updated by {1}
org.alfresco.links.link-deleted={0} link deleted by {1}

So I added my entries, and my javascript files pass in the new string I created.

However when I edit a file, I don't think the activityPostService is doing it, I get this error in the console
>>> Skipping activity post 28 since no specific/generic templates for activityType: com.eastport.list.list-updated

Reading the javadoc for activyService.postActivity it says you can post any "pre defined activities" so I'm guessing that's my problem.  How can you post custom activities?  (btw, my entry com.eastport.list.list-updated is in the mysql database, status error'd out though.)

Dave
1 REPLY 1

dwinfield
Champ in-the-making
Champ in-the-making
Along with the changes I made in activity-list.get.properties  (listed below) there were backend changes to make.

in alfresco.extension.templates.activities.com.eastport I copied the generic.json.ftl and slingshot-common.ftl from the alfresco.templates.activities.org.alfresco folder.

Then I created three files, and you can mirror what they do in remote-api\config\alfresco\templates\activies folder.