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