on 2016 Aug 08 6:57 AM
Hi,
I have set a notification trigger condition in PCo i.e. sum of few tags to be greater than 0, and I have created a transaction to mark the downtime in OEE every time the notification condition is not met. Can anyone suggest how to use alert action block to trigger that transaction? Also how can I capture the particular time from PCo when the tags are fetched?
Can anyone suggest some ideas on this?
Regards,
Shitikantha Nanda
Request clarification before answering.
Hi,
I am getting a notification xml from PCo as below.
<NotificationMessage>
<Header>
<Name>PCoUptime</Name>
<Description><![CDATA[PCoUptime]]></Description>
<Destination>MII</Destination>
<CreatedDate>2016-08-09T06:19:07</CreatedDate>
<ID>1ed4611c-657d-4263-976d-8a1e4f7f11d1</ID>
<Status>Delivered</Status>
</Header>
<Body>
<Values/>
</Body>
<Faults>
<Fault><![CDATA[Output expression 'Expression1' - [severity = Fatal] Tag 'COOKER Up' is not in the cache. Check the acceptable data quality filter in the corresponding source system.]]></Fault>
</Faults>
</NotificationMessage>
I am facing an issue in fetching the created date value in MII from the above xml.
Can anyone suggest some ideas on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shitikantha,
You creat a Transaction.
Create xml type input paramater to your transaction name it NotificationInputXML.
copy paste the XML above as a value for the input paramater NotificationInputXML.
now inside a sequence add a tracer action block.
in link expression of tracer mapp the Message property with Transaction.NotificationInputXML{/NotificationMessage/Header/CreatedDate}
execute the Trx you can retrieve the created date.
regards,
Kuntal
Hi Kuntal,
I guess what you are trying to say is to hard code the xml to an input parameter and fetch the created date. I have tried that and its working. But what I want is to fetch it dynamically i.e. when a notification xml will come from PCo to MII I want to fetch the created date from that xml in a run time basis because the xml is going to change everytime.
Hope my requirement is clear?
Regards,
Shitikantha Nanda
Hi,
I got your requirement,
I just shown you how we can access the values. just a test Trx. but now if the same test Trx you use and runtime pass the same form of XML as input ( we can remove the hadcoded XML) then the same code will work to get the created date vlues( different values in different xml passed as input) form the xml input.
** the Xpath used to access the values will depend on structure of XML
Regards,
Kuntal
Hi Kuntal,
I am having an input transaction parameter which I have mapped in PCo Notification destination. I have mapped the same input parameter to a write file to store it in web file.
The issue is that I am getting the XML in the web file but when I am putting a tracer to get the output of that input parameter, it is giving me blank and because of this I am unable to get the created date value.
Any suggestions?
Regards,
Shitikantha Nanda
Hi,
As per my understanding from what you have explained about your requirement.
1. Alert action will create an alert, that can be seen from alert monitor screen of MII and same time it will trigger mail to all mapped roles for the alert.
2.to get the time stamp of your notification, you can get that from your notification XML generated by PCo or you can have an output expression to return datenow from PCo ( it will be in UTC format).
Regards,
Kuntal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kuntal,
Thanks for replying. Let me elaborate my requirement.
I am using a write file to fetch the notification output xml from PCo and then using a text loader to read the xml from the web file where it is getting stored. Then I am using an Raise Alert action block to which I have mapped an alert object in which I have mapped a transaction that will be called when an alert will be raised.
Is my approach correct?
Regards,
Shitikantha Nanda
If purpose is to call a transaction ( which is delivery Trx for Alert) to execute a business logic based on the notification arrival from PCo. ( if alert fram work is not needed); you can do so by directly map your transaction as the PCo notification destination and map NotificationInputXML input parameter to deliver the notification XML.
If you want to implement Alert framework to manage alerts (role based) with followup actions, you can create a transaction and map that as a destination in PCo notification as told in above scenario, then you can use raise alert action and map inputs to alert from received notification XML in link expression of the action. As a delivery transaction in your Alert obj you can map your business logic transaction to be executed on alert raise. (viz; maintenance order creation).
regards,
Kuntal.
Hi Shitikantha,
The PCo Notifcation XML message that is passed to an MII transaction contains a node CreatedDate which contains the UTC datetime of the notification creation. Also, any tag that is passed by defined Output items for a Notification contains a timestamp attribute containing the UTC time that that tag was updated from the source. You see the structure and content of a Notification Message from within PCo by using the Test Notification Delivery capability from the PCo Notification Output tab.
Regards, Steve
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.