cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Purge an entire Value Stream

tcoufal
13-Aquamarine

Purge an entire Value Stream

Hi Guys,

I have a following scenario. I have Thing Template based on generic template. I have assigned a value stream on Template level.

I have created a several Things with several logged properties from that template. Now I would like to purge an entire ValueStream.

I cannot run the service on a Template level, so what I would have to do is to call PurgeProeprtyHistory service for each and every Thing.

This is not very efficient. Is there any other way how to purge an eintire ValueStream?

Thanks a lot.

ACCEPTED SOLUTION

Accepted Solutions

Hi Tomas,

There is no direct way to do this. As a workaround what you can do is create a service that gets all the Things implementing a Template having a given value stream as an InfoTable. Then loop over this InfoTable for Things and call PurgeProeprtyHistory service for each.

Thanks

View solution in original post

6 REPLIES 6

Hi Tomas,

Value Streams are designed for thing-driven models.As per description of value streams it store data from an associated thing’s property.

A value stream defined at template level stores separate data for each Thing implementing this Template ,so purging the value stream at Template level will remove value stream data for all the Things.

Imagine a situation where two user(user 1 and user2) are using a same Template having a Value Stream to store data for their respective Things and if user1 purges the value stream data for its own Thing using service at template level ,then this will remove the value stream data for Thing created by user2 as well which is troublesome.

So I think it’s not a good idea to purge value stream at template level.

Hope it makes some sense..!!

tcoufal
13-Aquamarine
(To:maneeshr)

Hi Maneesh,

I understand that, and for this particular purpose, purging the ValueStream on template level would be very much ok. I just dont know ho to do it.

Hi Tomas,

There is no direct way to do this. As a workaround what you can do is create a service that gets all the Things implementing a Template having a given value stream as an InfoTable. Then loop over this InfoTable for Things and call PurgeProeprtyHistory service for each.

Thanks

You can ask if the property it's logged or not

tcoufal
13-Aquamarine
(To:maneeshr)

That's what I thought.

Thanks.

qn
12-Amethyst
12-Amethyst
(To:tcoufal)

There are some solutions here Unable to cleanup value stream in loop

Announcements


Top Tags