We know that CALL SECTION & SQL are mutually exclusive. Because
dead lock will occur if both the actions point to the same table.
Ever you thought why not the dead lock is not happening with SQL and
Peoplecode action, if both the actions points to a single table.
Lets take a AE example:
SECTION : main
STEP 1:
Action : Peoplecode
we are updating the phone number of a particular employee.
ACTION : SQL
We are fetching the phone number of the employee which we updated in the previous action.
the value what we update will be reflecting in the next action.
END STEP
END SECTION
We know the commit will occur only at the end of the step or section,
then how come the changes what we done in tables using peoplecode
actions are reflecting in the next action itself.
The reason behind this is implicit commit in "SQLExec".Whenever we
write any code in sqlexec, it will be commited automatically. so the
changes are reflecting in the next action itself in the previous
example. Hence deadlock wont appear here with Peoplecode and SQL.
Such implicit commit is missing in case of SQL and call SECTION. thats the main reason for its mutually exclusiveness.
No comments:
Post a Comment