How to format Alfresco'API parameter activityFilter in servce user activities feed ? - alfresco

I need to use that api : http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Freferences%2FRESTful-FeedUserfeedGet.html
What I don't know is how to format activityFilter parameter ? What kind of things can I filter ? I'd like to set a max number of results, is it possible ?
I don't know where to find the documentation.
Thank you.
Mathieu.

I don't know where/if the list is documented, but it isn't hard to find out the values you are looking for...
The first place to go is the Web Script Index, which is:
http://localhost:8080/alfresco/service/index
From there you can find that web script, click on its ID, and see its declaration, any accompanying documentation, and, often, the code of the web script controller.
In this case, the controller is Java-based, so you can get its class and go look at that in the source.
Often, that's not convenient. So the next thing to do is to realize that Alfresco Share makes use of the same web script. If you turn on Firebug and go to the Alfresco Share Global Dashboard you can see the activity feed dashlet. As you change the second dropdown (the one that defaults to "all items") you will see your browser doing GETs against that web script. By choosing the various choices available in the dashlet, you'll see that the values it uses to filter activities are:
org.alfresco.comments.comment-created
org.alfresco.comments.comment-updated
org.alfresco.documentlibrary.file-added
org.alfresco.documentlibrary.file-deleted
org.alfresco.documentlibrary.file-updated
org.alfresco.documentlibrary.files-added
org.alfresco.documentlibrary.files-deleted
org.alfresco.documentlibrary.files-updated
org.alfresco.profile.status-changed
org.alfresco.site.user-joined
org.alfresco.site.user-left
org.alfresco.site.user-role-changed
You can pass more than one of these at-a-time to the web script by separating each with an escaped comma (%2C).
There may be more filters available, but those are the ones used by the activity feed dashlet on the global dashboard.

Related

SSRS hybrid action Go to URL go to report

I'm developing a recoursive bar chart with the capability to navigate through a tree hierarchy by getting parent and child data from stored procedures.
It works well but I need to define a different action for the last node that instead of go to report should be: go to URL.
ssrs Action
Is there any way to do that?
I finally solved by using go to url for both: go to report and go to url.
this is possible by specifying the Url of the report as go to url concatenating the parameters using the HTTG GET syntax.
As you cannot set the report action via an expression, the easiest way I can think of doing this is to have two copies of your control or whatever you need the the action on. Have one point to your report as normal and one that points to your URL. Then set the visibility of each control based on the node.
So, assuming it's the series property that you have the action on...normally the Goto report series would be visible but when you are at the last node, the goto URL series would be visible.
This should work but I've not tested it.
Alternatively, if you can determine if the next node will be the last one, you could have two copies of the report. The first would be your report as it is now and the seconds would be exactly the same but with as different action. You can set an expression to call the correct report in the goto report action properties based on the node level. As I said before though, you will need to know if the node you are looking at is the penultimate one.
Neither solution is that elegant but it should give you what you want,.

Filter at event viewer by data

I want to get event entries by their description (data).
I know how to get the event entry with a certain description, however I want to get an entry whith a description which contains a string (not equals to it).
That, I don't know how to do.
Please help :)
According to my answer here: https://stackoverflow.com/a/34119006/5089204 you should be able to retrieve EventRecords.
Dealing with these events is a quite complex issue... Each event has its own internal structure. The common properties are bundled in EventRecord, but the specific data must be taken from the internal details. Use the ToXml() method of an EventRecord...
In order to get the right events you must define an EventLogQuery. You must know the Provider's name and specify the filter.
Try the following: Open eventvwr and there the Windows-System queue. Right click one event, open the "Details" and choose the "XML-View". Look over different events and you will find, that they are quite differing.
But: You'll find everything you need there: First the "Provider Name" and the "EventId", these two are most important for the `EventLogQuery'.
Now go to the "define a user filter on the current protocoll"-action and type in some values. Then switch to the filter's XML and you'll learn how to define the correct query.
I'm sorry, there is no "easy and general" approach :-)

Open direct links to AX-objects or datasets from external application

Is there a way to open a specified document, eg "production order 123" or form, eg "purchase orders" in Ax2012 from an external application directly?
In detail, I'm looking for something similiar like AXPath, but this doesn't work with versions greater then 2009.
Is there any ( maybe included ) way to achieve this?
There is! It's using AX's drilldown functionality which uses AxHLink.exe to handle dynamics:// URLs, which are passed to the Classes\SysStartupCmd function. You could also create some custom code there if you wanted to launch the AX client executable directly.
My question I asked some while back should have a great deal of useful information in it here:
What handles dynamics:// URLs?
Some more can be found: http://technet.microsoft.com/en-us/library/aa834337.aspx
EDIT:
It sounds like you are confused or the posts weren't clear enough. I think you have 3 basic options.
Dynamics:// URLs are handled by AxHLink.exe and they only seem to handle drilldown, viewalert, and viewalertrule. So if you want to use Dynamics:// URLs, you will need to hi-jack those somehow. There is a pastbin from Jan in that other stack post.
Create a custom URI handler and event poller (lot of work) see http://axcoder.blogspot.dk/2010/10/how-to-open-form-in-running-ax-from.html
Extend SysStartupCmd and then instead of using Dynamics:// URLs, just call Ax32.exe -startupCmd directly and a parameter can be passed to your custom class.

Yahoo Pipes - Build an RSS-URL using specific parameters pulled from another RSS feed's content

The main Data Type used by Yahoo Pipes is the [Item], which is RSS feed content. I want to take an RSS's content or sub-element, make it into [Text] (or a number might work), and then use it as an INPUT into a [Module] to build a RSS-URL with specific parameters. I will then use the new RSS-URL to pull more content.
Could possibly use the [URL Builder Module] or some work-around.
The key here is using "dynamic" data from an RSS feed (not user input, or a static data), and getting that data into a Data Type that is compatible (and/or accessible) as an INPUT into a module.
It seems like a vital functionality, but I cannot figure it out. I have tried many, many work-around attempts, with no success.
The Specific API and Methods (if you are interested)
Using the LastFM API.
1st Method: user.getWeeklyChartList. Then pick the "from" (start) and "to" (end) Unix timestamps from 1 year-ago-today.
2nd Method: user.getWeeklyAlbumChart using those specific (and "dynamic") timestamps to pull my top albums for that week.
tl;dr. Build an RSS-URL using specific parameters from another RSS feed's content.
I think I may have figured it out. I doubt it is the best way, but it works. The problem was the module I needed to use didn't have and input node. But the Loop module has an input node, so if I embed the URL builder into the Loop module I can then access sub-element content from the 1st feed to use as parameters to build the URL for the 2nd feed! Then I can just scrap all the extra stuff generated by the Loop, by using Truncate.

lotus public variable in formula

once again I have to ask you for a help.
I have a problem with creating public variable and using it in formula.
The details of this issue is:
1, right after starting a Lotus Notes Application i have to create public variable EmpNum which will be contain an employee number (the number will be imported from IBM Blue Pages)
2, this EmpNum variable will be used to filter the data in a view, so I have to use it in formula in View Selection.
I'll be very grateful if you help with this issue.
Maybe there is possible any simplest solution of this problem?
Thanks in advance,
Tomasz (td2003)
EDIT:
Torsten, Panu, thank you.
I've decided to try write an EmpNum variable in notes.ini using #SetEnvironment and read it by #GetEnvironment, and it works.
BUT (!) there is a very strange thing:
1) when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber=#Environment("EmpNum")))" the view shows me all document where "TX_EmployeeNumber" is EMPTY;
2) otherwise when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber!=#Environment("EmpNum")))" (not equal) the view shows me all document where "TX_EmployeeNumber" is NOT EMPTY and no matter if TX_EmployeeNumber have exactly the same value as EmpNum.
For example: if EmpNum="P11" the view with 2nd formula shows the documents where TX_EmployeeNumber fields contains "P11", "P22", "A32" and so on.
I'm sure that #Environment("EmpNum") retrieves correct data from notes.ini.
I'm totally confused and completely don't know what's going on.
Do you have any idea about this?
First of all: There are NO public variables in Lotus Notes as you request it. Neither in LotusScript nor in Formula. Every variable just lives in its context, never in the complete client.
There are two places to put such a variable:
in the notes.ini, where you can set / read it using Formula (#Environment, #SetEnvironment, #getEnvironent) or LotusScript (NotesSession.GetEnvironmentString, NotesSession.SetEnvironmentVar).
In a Profile document in a database, where you can get it using #GetProfileField (Formula) or NotesDatabase.GetprofileDocument() (LotusScript)
Both of these approches will NOT help you for your number 2.
There is only ONE View- Selection- Formula for ALL Users. Putting something "userspecific" in there will let it render correctly for ONE value (the one, that the server uses when building the view- index), but not for all the others.
To solve your problem you can use:
a) An embedded View
A view that is categorized by empNum
A Form that has this view embedded and a Formula for "Show single category" for this embedded view set
b) A SPOFU view
SPOFU is "Shared, private on first use" and means, that every user has his own copy of the view. These views have some caveats and are hard to maintain. You should NOT use them, if you are not totally aware of the implications (getting the ACL right is one very important thing for these views)...
EDIT (due to change in question): SPOFU will neither work with Environment nor with Profile- documents, as the methods to read them are not supported in Views... So b) is not really an option... Sorry...
It is possible to use the #SetViewInfo formula in the QueryOpen and/or PostOpen of a view to get the view to only present data from one category. Be careful with this because you will need to touch EVERY view so that the value is cleared if the user navigates to a view which is not categorized by the employee num...
FWIW: I only have done this using #UserName not with another piece of data. I suggest you do that by having the import process add the fully qualified Notes name of the user to the documents as they are imported.
You can modify view selection formula with NotesView class. In this case you would have to use private views.
A better solution would be to use an XPage to show the view and use category filter. Or if you want to use traditional style then embed the view to a form or page and use "Show Single Category" feature.

Resources