Symantec IGA

Expand all | Collapse all

Policy Xpress Variable Usage in a Submitted Task Policy

Jump to Best Answer
  • 1.  Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 01-08-2018 02:32 PM

    Hello,

     

    If I have 2 PolicyXpress policies of type submitted task -

    1. PXA - evaluates on Task started 

    2. PXB - evaluates on Task completed

    If I set a variable on an action rule in Policy PXA - will it be available to PXB? 

     

    If YES - how is the variable's value managed across concurrent user threads? 

     

    Thanks,

    Ferzana



  • 2.  Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 01-08-2018 06:10 PM

    Policy Xpress has variables that are set with actions and saved as data elements (Variables category). Variables are shared across all policies that run at the same time, so a variable that has been set can be used by other policies of lower priority.

     

    For example, a variable can contain a value calculated once by a policy, and then shared across other policies that no longer need to recalculate the value. The initial policy sets a value to the variable, and policies that run later read that value by using a data element that has the variable name as a parameter.

    A variable can also be a trigger for other policies. In this case, the policies only run if the policy before them has run.

     

    For context within a concurrent user thread it's important to remember that Policies run as events whenever possible and as such are subordinate to the task that is being run for a particular user. In this way each execution is only within the context of a particular user being processed.



  • 3.  Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 01-08-2018 07:58 PM

    Thank you for the reply Sidney, however I require further clarity.

     

    A variable can be shared by all policies that run at the "same time". For event based - asynchronous policies, this makes sense.

    I suppose I want to know, what this statement implies, for a policy of type Submitted Task or UI where execution is synchronous. Under submitted tasks - there are 3 states available. Task Started, Task Completed and Task failed. Are these 3 states considered 3 different "time" frames within the task? If a variable is set in the action rule of a policy running on task started - will the variable be available to a different policy running on task completed? 

     

    Thanks,

    Ferzana



  • 4.  Re: Policy Xpress Variable Usage in a Submitted Task Policy
    Best Answer

    Posted 01-16-2018 03:04 PM

    Hi Ferzana,

     

    I will try to take a stab at answering your questions:

    1. [Q] Under submitted tasks - there are 3 states available. Task Started, Task Completed and Task failed. Are these 3 states considered 3 different "time" frames within the task?

    [A] Yes, these are different times within a lifecycle of a task. Task started is before the first event has been initialized. Task completed is when the primary event has completed. For example, the primary event of Create User task is CreateUserEvent. There can be many other secondary events within that same task, but they are not related to 'task completed' state in PX. Task failed is after the task has failed.

    UI based PX applies only to the duration of the task's screen being presented to the user, and ends once the user has clicked Submit/Ok/Cancel. This state was to provide an alternative to LAHs (Logical Attribute Handlers) which allow the addition of logic in the form of custom (Java) code to one or more specific attributes defined on that screen.

     

    2. [Q]  If a variable is set in the action rule of a policy running on task started - will the variable be available to a different policy running on task completed?

    [A] No, the variable will be available to another PX policy that runs on the same task in the same timing of the lifecycle. The order of execution between those two policies will be determined via the Priority field, where a lower number means a higher priority (running later than a bigger number of priority).

     

    Hope this helps, please let me know if you have further questions.

     

    Regards,

    Einav



  • 5.  Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 01-16-2018 03:13 PM

    Einav! Thanks for coming to my rescue again. 

     Yes - what you indicated makes sense now - specially if the three states are different times. That solves my problem. 

     

    Thanks again!



  • 6.  RE: Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 06-18-2019 03:11 AM

    Hi

    In case anyone is still tuned into this discussion after migration:

    I have a PX that fires on completion of a task, that assigns and revokes provisioning roles, and  sets a variable called "SuppressRevoke"

    I have an event-based PX that fires on RevokeProvisioningRoleEvent

    From my undertanding I should be able to retrieve this variable as {'PX_VARIABLE_SuppressRevoke'}, but I get a failure with message:

     ERROR MESSAGE: No element data was found for: PX_VARIABLE_SuppressRevoke

    Should I be able to access this variable is it "in scope" to the Second PX?


    Cheers
    David




  • 7.  RE: Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Broadcom Employee
    Posted 06-18-2019 04:41 AM
    PX variables can be passed only between PX policies of the same type. A PX policy of a particular type (i.e Task-type plocy) cannot retrieve a variable set by policy of a different type (i.e UI or Event-type policy).


  • 8.  RE: Re: Policy Xpress Variable Usage in a Submitted Task Policy

    Posted 06-18-2019 11:44 PM
    Thanks