The subject of the CM Activity Notification email has the following in the subject line. What does [2] do?
New Innovator Activity: ${Item[@type="Activity"]/name} for ${Item[2]/item_number}
The [2] just means to use the second item in the response. Based on the Query String, the second item is the controlled item of the workflow (a PR, ECR, ECN, Simple ECO or Simple MCO). The [2] syntax is just simpler than using [@type='PR' or @type='ECR' or ...].
Just wondering if I could get some clarrification on the syntax used in the email query
For the CM Activity Notification Query, I currently have:
<Item type="Activity" id="${Item/ActivityId}" action="get" select="name,message"/><Item type="${Item/@type}" id="${Item/@id}" action="get" select="item_number,title"/><Item type="ItemType" id="${Item/@typeId}" action="get" select="label"/>
Is this first looking for the itemtype based on the typeid of the current activity assignment, which I would assume would return "Activity Assignment", then that is used by the next query up to get the type and id (@type and @id) are the returned id and types, then that is used to get the activity information in the top item query?
or am I way off here? If I am, what do the "@" symbols represent and how would I know that for example Item/ActivityId would be available to the query?
this all makes much more sense to me when writing methods/reports and getting the info from the xpath as a result of the AML query, but this seems cryptic because I'm not sure what initial pieces of information it has.
Thanks for any help.
Hi.
Let a Workflow Process has been created for an Item (of type=Part) for example. This CM Activity Notification is used in Workflow events (for example, in OnActivityAssignment). This event has special input parameters (Item of type=Part AML node, ActivityId is an additional parameter indicating assigned activity ID). So, you can use the parameters in the query. Read Aras documentation for more details (just i did not investigate is it included into a doc).
Actually, this query is a portion of xslt stylesheet ("${..}" means "<xsl:value-of .../>") and syntax like Item/@id means id attribute of Item node according xslt syntax. So, this stylesheet is applied for input XML containing the handled Item node and those special parameter(s) and the generated query is executed on the server to fetch Activity and Item (type=Part).
<Item type="ItemType" id="${Item/@typeId}" action="get" select="label"/> is just to fetch label of Part ItemType (in the described example).
SamsAn.
Hello,
Thank you for the reply. I have searched the programmers guide, the report tool guide, etc and haven't been able to find the documentation that would describe extra parameters during certain activities (ex. ActivityId). Could you point me in the right direction so I can find these additional parameters?
Is it possible to view the XML that is passed directly so all of these parameters would be visible?
Also, being that the ${..} is just an <xls:value-of>, is it possible to just use xlst in the html? I'm looking into a scenario where I would need to iterate over a query with multiple results in an email response, so I'm hoping this might be possible.
Thanks again for any help,
Mike
Hello.
Yes, it is possible to use the same syntax in html (you can review Html content of that Email Message and see the examples of use).
You can sniff input parameters in the following way (for example).1. Create c# server-side method (name=MyMethod) saving input parameters (this.dom.OuterXml) into a file (for example) at server-side.2. In CM Activity Notification Query, setup query like below<Item type="Method" action="MyMethod"><params>${Item}</params></Item>3. Start workflow, etc. to call the notification query.-> You'll save the input xml into the file by MyMethod.
Hi SamsAn
I successfully started Email Notification in my Company but the message in email notification is very simple like "document is released" but i want to add some dynamic things like part no., item type, document name etc.
I know that this is possible by seeing above posts and doing lots of experiments with coding in email body but i don't get result. All i get is email message without item no. ,item type etc.
So if you have any idea, how to get item type name, item no. etc in message or what i am missing then plz share it.
Thanks
Rahul.