User Process definition variables / configuration properties

 7 Replies
 3 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
JasonP
Advanced Member
Posts: 28
Advanced Member
New Poster
New Poster
Congrats on posting!

I would like to be able to have a system config property of LastRunDate that everytime my IPA runs, I update that field that persists between workunits. How do i save this date to either some kind of process definition variable or system config property or possibly, can I query landmark on process AP010QS, get the last workunit and get a datetime that it ran a specific activity, whats the best approach.

David Williams
Veteran Member
Posts: 1127
Veteran Member
New Poster
New Poster
Congrats on posting!
You can add a system variable to the main configuration and refernce it each time your flow runs. That sounds like the best approach.
David Williams
Woozy
Veteran Member
Posts: 709
Veteran Member
New Poster
New Poster
Congrats on posting!
Hi JasonP,

David has the right approach.
If you're doing it for a specific flow, you may want to create a new configuration set for that flow (I name mine with the flow name) and then add variables for those values. This keeps them separate from the more global variables. To update or query the values, you'd need to do a landmark call against business class PfiConfigurationProperty (in PFI).

Good Luck!
Kelly
Kelly Meade
J. R. Simplot Company
Boise, ID
Woozy
Veteran Member
Posts: 709
Veteran Member
New Poster
New Poster
Congrats on posting!

On the other hand, if you don't want to have to store the value, I suppose you could query PfiWorkUnit based on the FlowDefinition to get the last time the flow started or finished. If you aren't purging activities, I suppose you could query PfiWorkunit joined to PfiActivity using the Workunit and ActivityName (which is the node ID) to get when that specific node was processed last.


Kelly
Kelly Meade
J. R. Simplot Company
Boise, ID
JasonP
Advanced Member
Posts: 28
Advanced Member
New Poster
New Poster
Congrats on posting!
So I have a configuration property I wish to hold the value of lastrundatetime called AP010QS_lastrundatetime.  Is this what you are calling a system variable.  I'm fluent in how to pull the values from these in IPA, but not fluent on how to SET/Update this in a flow.  What node, and what would the syntax look like?  Thanks.  I assume when I set it, the next time this 'scheduled' flow runs, it can retrieve the updated lastrundatetime from which the prevoius workunit updated.

Woozy
Veteran Member
Posts: 709
Veteran Member
New Poster
New Poster
Congrats on posting!
I'm not sure how you're querying the value, but you'd use a Landmark node in IPA to update that value.

To query the value using an IPA Landmark node, you'd use this:
_dataArea="" & _module="pfi" & _objectName="PfiConfigurationProperty" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize="30" & _relationName="" & _setName="" & _asOfDate="" & _effectiveDate="" & PfiConfiguration="main" & PfiConfigurationProperty="AP010QS_lastrundatetime" & Value

To update the value in an IPA Landmark node, you'd use this:
_dataArea="" & _module="pfi" & _objectName="PfiConfigurationProperty" & _actionName="Update" & _actionOperator="NONE" & _actionType="CreateUpdateDelete" & _runAsUser="" & _pageSize="30" & _relationName="" & _setName="" & _asOfDate="" & _effectiveDate="" & PfiConfiguration="main" & PfiConfigurationProperty="AP010QS_lastrundatetime" & Value="!<{date time variable}>"
Kelly Meade
J. R. Simplot Company
Boise, ID
Woozy
Veteran Member
Posts: 709
Veteran Member
New Poster
New Poster
Congrats on posting!
UGH - Lawsonguru stripped my dataArea variable. Be sure you populate it with the appProdline variable.
Kelly Meade
J. R. Simplot Company
Boise, ID
JasonP
Advanced Member
Posts: 28
Advanced Member
New Poster
New Poster
Congrats on posting!

Typically we use the config properties right in SQL / email /assign nodes by calling it like this .  I just wasn't sure how to EDIT/UPDATE them, ill try the LANDMARK Node and let you know.

 

ex.