Will this work? - Pipeline Binding

I’m looking for a specific user to receive an alarm based on them being assigned to a sensor that is alarming. If I create a pipeline with the same name of the user for each user, can I bind the Active, Ack and Clear Pipeline to the tag associated with the user assigned to the sensor? I’m attaching pictures of what I’m talking about to be more clear. Assuming that I have no typos, if I have a pipeline named James, and then James is assigned to that sensor, those three values should work correctly, correct?



I have the same problem in the test, I think your solution is going to work until a new operator is created and asigned to a sensor. so that new operator it’s not going to have a pipeline. I wondering if I can use just one pipeline and use some expression variable who receive the name of the operator and send the message to the correct operator, I think we can’t create one pipeline by operator, what if the client create 500 or more new operators?

What about your other question? “Display Certain Rows in Alarm Journal” https://inductiveautomation.com/forum/viewtopic.php?f=70&t=14288
Did you resolve it? I’m stuck whith this two requeriments and the days run out.

MoisesZV,

I was thinking the same thing, and had posted a topic on here looking for help on that, but I got no responses. Not knowing where to start on that, I figured if I added in my ‘walkthrough’ an extra section about new users needing new pipelines, I thought that may suffice? Other than this approach, I’m not sure what else to do. I don’t want to submit this without knowing it will be ok though, because I would rather not pay to take this test :laughing:

As far as my other question, you need to use the DB query tool and query data from a SQL DB to get the appropriate data. The alarm journal will not meet the requirements necessary for the assignment :/ I m currently just querying the most recent five alarms from the DB for the specific sensor. Hopefully that helps? I know that I didn’t even think about using the SQL DB for this part until it was pointed out to me, so hopefully this is helpful to you as well!

alewayhar

Yes, this will work, you can assign the Alarm Notification Pipelines to a String Memory tag. Also worth noting, it doesn't have to be a tag in your UDT, it could be any String Memory tag. I would probably reconsider your naming convention though, operators come and go, sensors are more likely to stay the same.

Currently there is no way to change the On-Call Roster in a notification block on the fly :/

Has this capability been added?

Not exactly, but there is now a 'Calculated Roster' option, where you can provide a script that returns virtual "users" from whatever rosters, database queries, tag reads, etc, you desire.

Thanks, I will look at that option again. Is it possible to pass a variable such as the user name to that script?

You have access to the same context the pipeline does - what username would you expect to show up there? If it’s an acknowledgement event, then you could use event['ackUserName'], or any of the other properties available to pipelines.

Thanks. Yes, that looks promising. Can you direct me to documentation for arguments to ‘event’ like that?

Most of the properties in the message properties table here should work; because pipelines are dynamic we can’t ‘know’ that all of these are available while you’re actually writing the script:
https://docs.inductiveautomation.com/display/DOC80/Notification+Block#NotificationBlock-MessageProperties

1 Like

Thanks, I was able to pass a variable in the alarm and display it in {} in a message. What would be very useful would be to be able to pull the email address associated with the user name in the gateway. Is that possible?

Thanks for the assistance.

Yep, use system.user.getUser and then getContactInfo(). Check for email as the contactType, then get the value to retrieve the email address.

1 Like

Thanks. I was able to add associated data to the alarm to pass the email address to the calculated roster.