reLoad a Property modified by the same Process

Hello,

I have a Process that modifies a given field in Person table..

In a next step in the same process, i want to load and use the new value of this field in the generating condition..

When i log the value of the field in pre-scritp..it still have the old value , 

I think it's normal as we are in the same session or connection..correct ?

So, is it possible to load this new value from DB ?

Thank you 

Parents
  • I think you get the whole idea wrong, how the process generation and process execution is working in One Identity Manager.

    Those two tasks are totally asynchronous and while the process generation will be run during the save operation of your entities, or during the event generation, the process execution is done asynchronously by the job services.

    Therefore, you might want to adapt your process with that in mind.

  • Thank you for your quick answer.

    I have two process on the same Table PersonHasTSBAAccountDef

    i gave them sort order 0 et 1

    So if I understand..the two processes are generated once the insert in the table PersonHasTSBAccountDef is done (taking into account generating conditions)?

    The first process update the value of a field in Person table..

    I want to check the changed value in a task in the seconde process (generating condition)..so that is no possible that way?

     

  • Hi,

    As said, the process will be generated with the values of the attributes 'at that time'.  When the process actually runs you are saying that one of the values will have changed and you want to use that value.

    I think what you need to do is use the 'Execute SQL with result' component to get the new value in real time (in the second process) ..... you could then use the 'Compare' component to decide which path you take next in your process ..... since you can't use the sql result in your generating condition as you don't know the value at generation time.

    There may be other ways to do this but that's just one idea.

    HTH, Barry.

  • Thanks, Barry.

    What I would propose, to avoid the check job that could be done as Barry mentioned, is to add another step to the process with sort order 0 after the step that updates the Person object, and that process step fires a custom event - choose any name you want - and the process with sort order 1 listens to that event only.

  • Hi Barry, Thank you 

    Do you have an example of using the ''Execute SQL with result'' in order to find the value of a field in Person Table?

    In parameters i have theses :

    OutValueName : Value = [name of OUT parameter]

    SQLStm = Value [SQL statement to execute]

    i'dont know how to format these parameters 

    And what is the  'Compare' component  ?

    Best regards,

  • An proper SQLStm for your use case would be

    SELECT myValueToSelect FROM Person WHERE UID_PERSON = '<the uid of the person to fetch the value from>'

    By the way, there is no compare component, just a compare task and that can be used to compare process values, for example 2 out-values.

    HtH

Reply Children
No Data