cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Properties - Retentive

Former Member
0 Kudos

Hi,

Is it possible to have local properties in a transaction be retentive from transaction scan to scan (same transaction)?

I'm scanning a PI alarm tag and trying to hold the most severe alarm status during a phase even if the alarm returns to normal?

I don't want to have to write the alarm status to a .js file or PI database and retrieve it each time.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am not sure if i understood your question completely but this might be of some interest http://wbhelp.sap.com/manufacturing/xmii_120/en/44/681DC48157311FE10000000A155369/content.htm

Take a look @ the property Reset State.

(This is true for 11.5 as well)

Edited by: Udayan Upreti on Feb 6, 2008 11:21 AM

Former Member
0 Kudos

Thanks, but not exactly what I"m looking for.

Basically, if I trigger a trx 2 times, if I set my local property to "5" on the first execution, then the next time I execute the same transaction, I want to use that value recorded in execution #1 for execution #2.

Execution #2:

If local.var1 = "5", do something, else do something else.

Thanks.

Former Member
0 Kudos

Well in that case with every execution the transaction would be reloaded and resetting all your properties , transaction as well as local.

A read to a datasource would be required I guess.

0 Kudos

Kelly,

Depends on how the transaction is called...

If you're calling it from a parent transaction then in the Call Transaction action configuration there is a "reset state on each execution" check box which will preserve the local property values.

Otherwise you have to store it somewhere else, Global read/write of values in a transaction are not supported...unless you wanted/were ok with custom actions to do this....

Sam

Former Member
0 Kudos

Could you return the variable you are interested in from the transaction, and write a simple bit of javascript to pass it back in again next time?

Former Member
0 Kudos

Kelly,

One option to do this is to keep the value in one xml file and read the xml file every time you execute the transaction.

Hope this helps

Rupesh

Answers (1)

Answers (1)

Former Member
0 Kudos

If you want it to be "fully retentive" (e.g. it maintains its value even if the computer restarts), then of course, you'll need to write it to a database or to disk as an XML file. If you only need it to be retentive between successive calls, but it would be acceptable to have it lose its value if you restart the computer, the easiest way is to use the "Simulation" server and create your own read/write tags to store these values in memory. You can use a TagQuery in CurrentWrite/Current mode to write/read the value(s).