Are you over 18 and want to see adult content?
More Annotations
![A complete backup of krystal28.wordpress.com](https://www.archivebay.com/archive2/9c5b18df-9374-4356-a25f-eac72a9240b6.png)
A complete backup of krystal28.wordpress.com
Are you over 18 and want to see adult content?
![A complete backup of drakorindo-ina.over-blog.com](https://www.archivebay.com/archive2/a2e578a6-bbfe-4fbf-aec6-b388729e26cc.png)
A complete backup of drakorindo-ina.over-blog.com
Are you over 18 and want to see adult content?
![A complete backup of kaizerchiefs.com](https://www.archivebay.com/archive2/cffbb861-009e-4b05-9972-97b99ea6f794.png)
A complete backup of kaizerchiefs.com
Are you over 18 and want to see adult content?
Favourite Annotations
![Daily Reckoning Australia - Financial Market News That Australian Investors Need to Know](https://www.archivebay.com/archive/ac901d94-46e4-449d-80b5-a153cc3d4075.png)
Daily Reckoning Australia - Financial Market News That Australian Investors Need to Know
Are you over 18 and want to see adult content?
![Rocks DigitalWe ROCK Local, Social and Mobile](https://www.archivebay.com/archive/8fcda8a1-1f87-462f-8806-d032cc2cec15.png)
Rocks DigitalWe ROCK Local, Social and Mobile
Are you over 18 and want to see adult content?
![Resort Land & Zee, het hart van ontspanning...](https://www.archivebay.com/archive/9160d1d0-b611-4c9c-ad49-78ba5f91809d.png)
Resort Land & Zee, het hart van ontspanning...
Are you over 18 and want to see adult content?
![BlitzDigital | A primeira revista eletrônica para policiais militares](https://www.archivebay.com/archive/83446e4c-5dcf-4ab3-a6d6-3509053e43c5.png)
BlitzDigital | A primeira revista eletrônica para policiais militares
Are you over 18 and want to see adult content?
![Ansa Merchant Bank Limited | Shaped By Your Needs](https://www.archivebay.com/archive/4949be42-307c-4e70-859d-ed9e08a3323e.png)
Ansa Merchant Bank Limited | Shaped By Your Needs
Are you over 18 and want to see adult content?
![Bax Houthandel, producent van houten vloeren, parket en lamelparket](https://www.archivebay.com/archive/77a7039d-d2d3-4af0-a424-f53c75a96a50.png)
Bax Houthandel, producent van houten vloeren, parket en lamelparket
Are you over 18 and want to see adult content?
![boletinagrario.com - Agricultura, Medio Ambiente y Mundo Rural.](https://www.archivebay.com/archive/12a4d246-c508-4fbd-8c40-b5a8edaf45b9.png)
boletinagrario.com - Agricultura, Medio Ambiente y Mundo Rural.
Are you over 18 and want to see adult content?
![JetBrains: Developer Tools for Professionals and Teams](https://www.archivebay.com/archive/f84e14bc-8a30-49f2-a809-7eaab1b65d9f.png)
JetBrains: Developer Tools for Professionals and Teams
Are you over 18 and want to see adult content?
![Pay Bills With Bitcoin | BTC to AUD | Living Room Of Satoshi](https://www.archivebay.com/archive/cb996678-918b-4506-b6c0-98b0aac7db22.png)
Pay Bills With Bitcoin | BTC to AUD | Living Room Of Satoshi
Are you over 18 and want to see adult content?
![Total Car Diagnostics | OBD Scan Tools & Auto Repair Tools & Software](https://www.archivebay.com/archive/5cce1aae-b95a-4495-9d70-9c503445a380.png)
Total Car Diagnostics | OBD Scan Tools & Auto Repair Tools & Software
Are you over 18 and want to see adult content?
Text
modified
7) Deploy the definition and run the process to populate SES 8) Modify code to assign new field value from SES to field on page. Posted by Shilsagar Belekarat 9:43 PM
No comments:
Links to this post
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
Labels: Peoplesoft Recruitment Careers,
SES
TUESDAY, AUGUST 26, 2014 C H A P T E R 19 ROW LEVEL SECURITY FOR RECRUITING ROW LEVEL SECURITY BASIC 1) check the row security field from user profile on general tab 2) check for that permission list in security by permission list 3) select * from PS_SJT_CLASS_ALL WHERE CLASSID = row securitypermission list
4) we can get security type cd, and security keys from above query 5) SELECT EMPLID FROM PS_SJT_PERSON WHERE SECURITY TYPE CD = security keys from above query 6) if you get rows you have access if not you dont have access SEE JOB OPENING ONLY IF THEY ARE IN HIRING TEAM IN A JOB OPENING. 1) Create a new permission list 2) Add the permission list in the Setup HCM > security > core row level security > security by permission list 3) select security set as RSOPEN 4) security access type as 031 > save 5) Now add this permission list to roles for which you want to see job opening only if they are in Hiring Team in a job opening. Note: Disable other security sets from RSOPEN if you are using only031.
Posted by Shilsagar Belekarat 4:27 PM
No comments:
Links to this post
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
Labels: Peoplesoft row level security,
RSOPEN
TUESDAY, OCTOBER 15, 2013 C H A P T E R 18 BUILT IN FUNCTIONS IN PEOPLECODEACTIVEROWCOUNT
Syntax
ACTIVEROWCOUNT(_Scrollpath_) Where _scrollpath _is: RECORD._target_recname_Description
Use the ActiveRowCount function to return the number of active (non-deleted) rows for a specified scroll area in the active page.ADDATTACHMENT
Syntax
ADDATTACHMENT(_URLDestination_, _DirAndFilename_, _FileType_, _UserFile_ where _URLDestination_ can have _one_ of the following forms:URL._URLname _
Or a string URL, such as ftp://user:password@ftp.ps.com/Description
Use the AddAttachment function to transfer a file from one server to another. You could use this to associate a file with a row in a record, or with a page of data.ADDTODATE
Syntax
ADDTODATE(_date_, _num___years_, _num___months_, _num___days_)Description
Use the AddToDate function to add the specified number of years, months, and days to the _date_ provided. Suppose, for example, that you want to find a date six years from now. You could not just multiply 6 times 365 and add the result to today’s date, because of leap years. And, depending on the current year, there may be one or two leap years in the next six years. AddToDate takes care of this for you. You can subtract from dates by passing the function negative numbers.ALLOWEMPLIDCHG
Syntax
ALLOWEMPLIDCHG(_is_allowed_)Description
By default, the Component Processor does not allow an user to make any changes to a record if a record contains an EMPLID key field and its value matches the value of the user’s EMPLID. In some situations, though, such changes are warranted. For example, you would want employees to be able to change information about themselves when entering time sheet data. The AllowEmplIdChg function enables the user to change records whose key matches the user’s own EMPLID, or prevents the user from changing these records. The function takes a single Boolean parameter that when set to True allows the employee to update their own data. When the parameter is set to False, the employee is prevented fromupdating this data.
After permission is granted, it stays through the life of the _component_, not the page. After a user switches to another component, the default value (not being able to make changes) isreapplied.
BREAK
Syntax
BREAK
Description
Use the Break statement to terminate execution of a loop or an Evaluate function. The program resumes execution immediately after the end of the statement. If the loop or Evaluate is nested in another statement, only the innermost statement is terminated.CALLAPPENGINE
Syntax
CALLAPPENGINE(_applid _); Where _statereclist _is list of record objects in the form: _&staterecord1 _ . . . There can be only as many record objects in _statereclist _as there are state records for the Application Engine program. Additional record objects are ignored.Description
Use the CallAppEngine function to start the PeopleSoft Application Engine program named _applid_. This is how to start your Application Engine programs synchronously from a page. (Prior to PeopleTools 8, you could do only this using the RemoteCall function.) Normally, you won’t run PeopleSoft Application Engine programs from PeopleCode in this manner. Rather, the bulk of your Application Engine execution will be run using the Process Scheduler, and the exception would be done using CallAppEngine. The _staterecord _can be the hard-coded name of a record, but generally you use a record object to pass in values to seed particular state fields. The record name must match the state record nameexactly.
The _processinstance_ allows you to specify the process instance used by the Application Engine runtime. In your PeopleCode program this parameter must be declared of type integer since that is the only way the runtime can tell whether the last parameter is to be interpreted as a process instance. For more details see the Application Engine documentation. &REC = CreateRecord(RECORD.INIT_VALUES); &REC.FIELD1.Value = "XYZ"; /* set the initial value for INIT_VALUES.FIELD1 */ CallAppEngine("MYAPPID", &REC);COMMITWORK
Syntax
COMMITWORK()
Description
Use the CommitWork function to commit pending changes (inserts, updates, and deletes) to the database.COPYFIELDS
Syntax
COPYFIELDS(_from_, _to_) where _from _and _to _are constructions that reference rows of data on specific source and target records in the component buffer; each have the following syntax: _level_, _scrollpath, target_row_ and where _scrollpath _is: RECORD._target_recname_ To prevent ambiguous references, you can also use SCROLL. _scrollname_, where _scrollname _is the same as the scroll level’s primary record name.Description
Use the CopyFields function to copy like-named fields from a row on the specific source record to a row on the specific target record.CREATEMESSAGE
Syntax
CREATEMESSAGE(OPERATION._messagename_ )Description
Use the CreateMessage function to instantiate a message object that refers to a message definition associated with a service operation. Local message &MSG; &MSG = CreateMessage(OPERATION.MessageName);CREATERECORD
Syntax
CREATERECORD(RECORD._recname_)Description
Use the CreateRecord function to create a _standalone _record definition and its component set of field objects. The specified record must have been defined previously, that is, it must have a record definition. However, if you are calling this function from PeopleCode associated with a page, the record does not have to be included on the current page. The record and field objects created by this function are accessible only within PeopleCode. They can be used with any of the record and field object methods and properties. The record and field objects are automatically deleted when there are no remaining references to them stored in any variables. You can select into a record object created this way using the SelectByKey record class method. You can also select into it using theSQLExec function.
Local Record &REC2; &REC2 = CreateRecord(RECORD.OPC_METH);CREATEROWSET
Syntax
CREATEROWSET({RECORD._recname_ | _&Rowset_} . . .)Description
Use the CreateRowset function to create an _unpopulated_, standalonerowset.
A standalone rowset is a rowset that has the specified structure, but is not tied to any data (that is, to the component buffer or to a message.) In addition, a standalone rowset isn’t tied to the Component Processor. When you fill it with data, no PeopleCode runs (like RowInsert, FieldDefault, and so on.) The first parameter determines the structure of the rowset to becreated.
If you specify a record as the first parameter, it’s used as the primary level 0 record. If you don’t specify any other parameters, you create a rowset containing one row, with one unpopulated record. To populate this type of rowset with data, you should only use:*
the Fill or FillAppend rowset class methods*
a record method (SelectByKey)*
the SQLExec function If you specify a rowset object, you are creating a new rowset based on the structure of the specified rowset object, including any child rowsets. It will not contain any data. If you want to populate this type of rowset with data, use the CopyTo method or a SQL statement. The following code creates a rowset structure composed of four records in an hierarchical structure, that is,QA_INVEST_HDR
QA_INVEST_LN
QA_INVEST_TRANS
QA_INVEST_DTL
Note that you have to start at the _bottom_ of the hierarchy, and add the upper levels, not the other way around. Local Rowset &RS, &RS2, &RS_FINAL; &RS2 = CreateRowset(RECORD.QA_INVEST_DTL); &RS = CreateRowset(RECORD.QA_INVEST_TRANS, &RS2); &RS2 = CreateRowset(RECORD.QA_INVEST_LN, &RS); &RS_FINAL = CreateRowset(RECORD.QA_INVEST_HDR, &RS2);CREATESQL
Syntax
CREATESQL()
&Sql1 = CreateSql("Select * from " | &TableName); &AAny = CreateArrayAny(); While &Sql1.Fetch(&AAny) /* Process the row in &AAny. */...
End-While;
DOMODAL
Syntax
DOMODAL(PAGE._pagename, title, xpos, ypos,)
where _scrollpath _is: RECORD._target_recname_ To prevent ambiguous references, you can also use SCROLL. _scrollname_, where _scrollname _is the same as the scroll level’s primary record name.Description
Use the DoModal function to display a secondary page. Secondary pages are modal, meaning that the user must dismiss the secondary page before continuing work in the page from which the secondary page wascalled.
If you call DoModal without specifying a level number or any record parameters, the function uses the current context as the parent. You can alternately specify a secondary page in a command push button definition without using PeopleCode. This may be preferable for performance reasons, especially with PeopleSoft Pure InternetArchitecture.
DoModal can display on a single page. To display an entire component modally, use DoModalComponentExample
DoModal(PAGE.EDUCATION_DTL, MsgGetText(1000, 167, "Education Details - %1", EDUCATN.DEGREE), - 1, - 1, 1, RECORD.EDUCATN, CurrentRowNumber());ENDMODAL
Syntax
ENDMODAL(_returnvalue_)Description
Use the EndModal function to close a currently open secondary page. It is required only for secondary pages that do not have OK and Cancel buttons. If the secondary page has OK and Cancel buttons, then the function for exiting the page is built in and no PeopleCode isrequired.
Example
The following statement acts as an OK button:EndModal(1);
The following statement acts as a Cancel button:EndModal(0);
DOMODALCOMPONENT
Syntax
DOMODALCOMPONENT(MENUNAME._menuname_, BARNAME._barname_, ITEMNAME._menuitem_name_, PAGE._component_item_name_, _action_, RECORD._shared_record_name_ ) where _keylist _is a list of field references in the form:_field1 _. . .
Or
_&RecordObject1 _. . .Description
Use the DoModalComponent function to launch a modal component. The modal component launches from within an originating component. After the modal component displays, the user can’t proceed with changes to the originating component until either accepting or canceling themodal component.
Modal components can be displayed in any of the following action modes: Add, Update/Display, Update/Display All, Correction. A modal component can be launched from any component, including another modal component. You can use DoModalComponent from a secondary page. The originating component and the modal component share data, including search keys, using a Shared Work Record or the values in the _fieldlist_ parameter. If valid search keys are provided in the shared work record and populated with valid values before launching the modal component, the search is conducted using the provided search key values. If the _fieldlist_ parameter isn't used and no search keys are provided, or if search key fields contain invalid values, the user accesses the modal component using a search dialog box.Example
The following example shows how to structure a DoModalComponentfunction call:
DoModalComponent(MENUNAME.MAINTAIN_ITEMS_FOR_INVENTORY, BARNAME.USE_A, ITEMNAME.ITEM_DEFINITION, COMPONENT.ESTABLISH_AN_ITEM, "C", RECORD.NEW7_WRK);ENDMODALCOMPONENT
Syntax
ENDMODALCOMPONENT(_ReturnValue_)Description
Use the EndModalComponent function to close a currently open secondary component. You could use this for creating your own links to exit a modal component.Example
EndModalComponent(0); /* cancels the component without saving */ EndModalComponent(1); /* saves and closes the component */DOSAVE
Syntax
DOSAVE()
Description
Use the DoSave function to save the current page. DoSave defers processing to the end of the current PeopleCode program event, as distinct from DoSaveNow, which causes save processing (including SaveEdit, SavePreChange, SavePostChange, and Workflow PeopleCode) to be executed immediately. DoSave can be used only in FieldEdit, FieldChange, or MenuItemSelected PeopleCode.DOSAVENOW
Syntax
DOSAVENOW()
Description
The DoSaveNow function is designed primarily for use with remote calls. It enables a PeopleCode program to save page data to the database before running a remote process (most frequently a COBOL process) that will access the database directly. It is generally necessary to call DoSaveNow before calling the RemoteCall function. DoSaveNow causes the current page to be saved immediately. Save processing (including SaveEdit, SavePreChange, SavePostChange, and Workflow PeopleCode) is executed before continuing execution of the program where DoSaveNow is called. DoSaveNow differs from the DoSave function in that DoSave defers saving the component until after any running PeopleCode is completed. DoSaveNow can only be called from a FieldEdit or FieldChange event. If you call DoSaveNow and there are no changes to save, save processing is skipped entirely. You can call SetComponentChanged right before you call DoSaveNow. The SetComponentChanged function makes the Component Processor think there are changes and so will force fullsave processing.
ERROR_ _
Syntax
ERROR_ str_
Description
Use the Error function in FieldEdit or SaveEdit PeopleCode to stop processing and display an error message. It is distinct from Warning, which displays a warning message, but does not stop processing. Error is also used in RowDelete and RowSelect PeopleCode events. Error MsgGet(11100, 180, "Message not found.");Syntax
EXIT()
Description
Use the Exit statement to immediately terminate a PeopleCode program. If the Exit statement is executed within a PeopleCode function, the main program terminates.MESSAGEBOX
Syntax
MESSAGEBOX(_style_, _title_, _message_set_, _message_num_, _default_txt ) where _paramlist_ is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string, in the form:_param1_ . . .
Description
Use the MessageBox function to display a message box window. This function combines dialog-display ability with the text-selection functionality of MsgGet, MsgGetText, or MsgGetExplainText. The _style_ parameter selects the buttons to be included. _title _determines the title of message. MessageBox(0, "", 1, 1, "Message not found."); Posted by Shilsagar Belekarat 5:52 PM
No comments:
Links to this post
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
C H A P T E R 17 APPLICATION ENGINE Application Engine is a shell to execute business logic: • The front end uses Application Designer to define and maintain an Application Engine program. • The back end is the PeopleTools executable that runs the Application Engine program. An Application Engine program is a set of SQL statements, PeopleCode, and program control actions that performs a business process. Application Engine Programs can perform row-by-row processing, or use set-based processing. Application Engine does not generate SQL or PeopleCode. This executable program is called PSAE.exe developed in c++ There are several benefits to developing a program using ApplicationEngine, instead of
COBOL or SQR:
• Graphical Development Tool • Program Encapsulation • Data Dictionary Integration • Enhanced SQL/Meta-SQL Support • Effective Dating • Reuse Business Logic• Upgrade Support
More benefits to using Application Engine include: • Built-In Restart Logic or Rerun Logic • Debugger and Traces • Temporary Table Management for Parallel Processing • Event Driven Logic i.e. Daemon Processing • Tuning Utilities • Commit Level Flexibility Application Engine programs reside completely within your database. Application Engine programs do not require compilation. There is no direct interaction with the operating environment. Application Engine programs are developed within the ApplicationDesigner.
Programs can be run and debugged without exiting PeopleTools With PeopleSoft, a checkpoint in an Application Engine program is the point at which restart information is written out to the PS_AERUNCONTROL table. This is used with restartable programs to allow them to determine where to pick up processing when they resumeafter a failure
_ABENDS_
Abends can be controlled or uncontrolled. A controlled abend means that Application Engine exits "gracefully" because of a calculated error condition. Some examples of controlledabends are:
• SQL errors while you have set On Error = Abort. • PeopleCode return value of if On Return = Abort. • SQL statement affects no rows and you have set No Rows = Abort. In these situations (when Application Engine is in control) the Run Status in Process Monitor reads “No Success”. An uncontrolled abend occurs in situations where there is a memory violation or a user kills a process. In these cases, the Run Status in Process Monitor shows “Processing”. Application Engine programs are made up of one or more sections: • Each section has one or more steps. • Each step contains one or more actions. • An action may contain SQL, PeopleCode, or program flowinstructions.
_SECTIONS_
A section is a set of steps that get executed as part of a program. A section comprises one or more steps and is equivalent to a COBOL paragraph or an SQR procedure. You can call sections (and other programs) from steps within other sections. All Application ENGINE PROGRAMS MUST CONTAIN AT LEAST ONE SECTION ENTITLED MAIN. The execution of the program always starts with the MAIN section. (Application Engine libraries do not contain a MAIN section, but they are not directly executable. Libraries contain sections that must be called from another Application Engine program.)_STEPS_
A STEP IS THE SMALLEST UNIT OF WORK THAT CAN BE COMMITTED WITHIN A PROGRAM. It contains one or more actions that execute SQL, PeopleCode, or a program flow action. When a section gets called, its steps execute sequentially. Every program begins by executing the first step of the required section called MAIN and ends after the last step in the last called section completes._ACTIONS_
There are multiple types of actions that can be specified within a step. It is common to have multiple actions associated with a singlestep
Application Engine section:• Is callable.
• Is executed only when called, except for MAIN. • Contains one or more steps. • Can be configured to specify Market, Effective Date, Effective Status, and Platform Auto Commit checkbox after step: You can specify when data gets committed to the database. This is important when a program abends and needs to be rerun or restarted. You need to know what was committed.Default is only one commit at theend of the program.
Section Type-prepare only Access -Controls whether this section can be called from anotherprogram
An Application Engine step: • Is a logical grouping of actions. • Contains one or more actions. • Is the smallest unit of work that can be committed. • Is executed from top to bottom within a section COMMIT AFTER Determines when commit will be executed: • Default: uses value supplied for the section· • Later: do not commit now • After step: commit when step completes ON ERROR Determines the action to take when an error occurs: • Abort - program will write message to message log and terminate· • Ignore - program will write message to message log and continue • Suppress - no message will be written, but program will continue àProgram abort will cause a rollback to occur. An action is an Application Engine “line of code.” There are nine possible actions. The two general types are: • Data manipulation.• Program flow.
Actions must be unique within a step. Actions are executed top down. When you build and Application Engine program, follow theseguidelines:
• Sections, steps, and actions are inserted below the cursor focus. • Sections are executed only when called, but display inalphabetical order.
• Steps are executed in display order. • Actions are displayed and executed in a predefined order. Using Markets in an Application Engine program: • Permits the customization of steps for specific global markets. • Permits the development of one program for multiple markets AE Program Properties: • Document the program and set ownership. • Determine runtime characteristics. • Determine state records used. • Determine temporary tables used. • Determine advance properties.DISABLE RESTART
Select this to disable the Application Engine built-in restart capabilities for this program.APPLICATION LIBRARY
If the program is to contain only a collection, or “library,” of common routines (in the form of "callable" sections) this option is selected. The program in this case will not run standalone. When sections are defined as "Public," other programs can call the sections, or routines, that exist in the “library” at runtime. A program of this type does not require the MAIN Section, or an initial entry point. Setting this option renames or removes any existing MAINsection.
BATCH ONLY
Select this check box for batch only programs. Batch only programs are not executed from the CallAppEngine() PeopleCode function. Any dedicated temporary table used for Batch Only programs do not have online instances created. MESSAGE SET Specifies the message set value to be assigned as the default message set number for this Application Engine program. The system uses this Message Set value for all Log Message actions where the message set is not specified.PROGRAM TYPE
Select the appropriate program type from the list: Program Types • Standard – normal programs • Upgrade Only - PS upgrade utilities • Import Only – PS import utilities • Daemon Only – Managed and run by PSDAEMON • Transform Only – Application Engine programs to supportXSLT action types
Three methods that developers use to test Application Engine programsinclude:
• Execute directly from Application Designer in two-tier. • Use a developer’s shortcut through the Process Scheduler. • Execute from host operating system command line.STATE RECORD
There may be zero, one, or many state records associated with aprogram.
The state record:
• Is used to hold runtime variables for the Application Engineprograms run:
• Is maintained by the developer and is invisible to the user. • Is used to hold all SQL Select results. • Can be a derived/work record or a SQL table. -The first field must always be PROCESS_INSTANCE and it must be akey field.
• Any additional fields on the record will be variables used withinthe program.
• To identify the record to the system, the name of the state record must end in AET. • If the state record is a SQL table type, it must be built as a table before it is used. PROCESS_INSTANCE must be a key. There is no need for any other keys, but they can exist and you will see additional keys on some PeopleSoft delivered state records, but the only key that's used isPROCESS_INSTANCE.
A state table can be a SQL table or a Derived/Work record definition. • Use the type Derived/Work type to increase performance. • Derived/Work records are reinitialized after each commit. • Use the type SQL table when: • It is necessary to preserve any state record field values across commits in your program. • It is necessary to preserve values for restart. NOTE. The only difference between SQL tables and Derived/Work records is that Derived/Work state records cannot have their values saved at commit time, therefore the values would be lost during a restartFIELD ATTRIBUTES
State record field attributes. • State Record field attributes need not match those of the sourcerecords.
• Date fields in particular, must not be required in the record. • Having date fields as required will cause Application Engine toabend.
• Other fields set as not null in the record in the database mayalso cause abends.
If the program is not restartable, Application Engine may not abend even though a date field is required because there will only be a commit of the state record table if the program is restartable.Note these points:
• At start, a row is inserted into the state record corresponding to the system-assigned process instance. • The state record table is updated whenever a COMMIT occurs (when restart is enabled). • The row used by a program is deleted on successful completion. • Multiple programs may use the same state record. • PeopleCode or the %Select construct in a SQL action store values in the state record. • PeopleCode or %Bind reference fields in the state record and retrieve their values. • No record PeopleCode on the state record is executed. • No PeopleSoft edits will be applied to state record fields._SETTING VALUES_
To set values in the State Record, you use the %Select construct in aSQL statement or
write PeopleCode that references the state field with the standard _record.field _notation. To reference fields in the state record you use the %Bind Construct.Meta-SQL:
• Expands to platform-specific SQL substrings. • Causes another function to be called. • Substitutes a value. • Is used in PeopleCode, Application Engine, and COBOL. THERE ARE SEVERAL COMMON APPLICATION ENGINE TESTING TOOLS AVAILABLETO YOU:
• The Process Monitor. • The Application Engine Trace file. • The Application Engine interactive debugger. • The PeopleCode Debugger If you change the TraceAE values in the Server Agent configuration file it will affect all Application Engine programs initiated by that server agent. If you change the TraceAE values in the Application Server configuration file it will affect all Application Engine programs invoked by PeopleCode (CallAppEngine) that are run on thatApplication Server.
Start, Programs, PeopleSoft 8, Configuration Manager, Trace _PROCESS INSTANCE NAME OF FILE_ Without a Process Instance AE_Where:
Debug –
To start the Application Engine Debugger: 1. Launch Configuration Manager. 2. Select the Profile tab. 3. Highlight the Default profile. 4. Click the Edit button. 5. Select the Process Scheduler tab. 6. In the Application Engine group box, select the Debug checkbox. The Application Engine Debug tool allows you to run a program in step mode, view the State Record as it changes and set breakpoints to permit you to determine exactly what your application is doing.RESTART
Using Application Engine Restarts is key to protecting data integrity and saving time when Application Engine programs fail and need to be restarted. Restart permits work that has already been completed to beskipped.
A process can be restarted without danger of processing the same rowsagain.
When using Application Engine Restart, there are several program level commit settings that can be selected to make a program restartable: • Commit after each step in that section. ---Auto Commit at Sectionlevel
• Require commits after a specific step. • Commit frequency within a step or n iterations for loopingactions.
Do Select:
• Is the equivalent of a For loop in an Application Engine program. • Is driven by a %Select statement SQL. • Populates a state record with values to be used by other actions. • Controls execution of subsequent actions in a step.DO SELECT TYPES
The three Do Select types are:• SELECT/FETCH
• RESELECT
• RESTARTABLE
The Do Select types re differentiated by: • Cursor handling. • Checkpointing and commit handling. _WHAT IS A PEOPLESOFT APPLICATION ENGINE CHECKPOINT?_ This can be confusing, as many database systems use “checkpoint” to describe a timestamp that allows the RDBMS to control rollbacks, and perform specific actions like updating tables from its workspace and writing information to the database log. With PeopleSoft, a checkpoint in an Application Engine program is the point at which restart information is written out to the PS_AERUNCONTROL table. This is used with restartable programs to allow them to determine where to pick up processing when they resumeafter a failure.
CURSORS
A cursor is a temporary workspace used by the RDBMS to exchange information with a program. A cursor is created and opened whenever a SQL statement is sent tothe RDBMS.
A cursor’s memory buffer can contain multiple rows, retrieved in turn individually by a Fetch. Work done on rows in a cursor is conditional until a Commit iscarried out.
Rollback discards work done in a cursor back to the last Commit. An Application Engine may have many cursors open simultaneously, andmany may be
opened and closed during the course of program execution._SELECT/FETCH FLOW_
The flow for Select/Fetch is: • Select/Fetch opens a cursor to the database and populates it with all rows that meet the SQL select conditions. • Then it fetches the first row from the cursor. • If no rows are found, the subsequent actions in the same step are skipped and the next step is run. • If a row is found, other actions within the same step are run. • Then it returns to the open cursor to fetch the next row. • This process repeats for every row in the cursor • Any Commits or checkpoints contained _within _the loop will beignored
_WARNING: __With this type of fetch, you will typically want some aspect of the loop to_ _eventually cause the Select to return no rows. Otherwise, there willbe no mechanism in_
_place by which to exit the loop. This type of Do Select isrestartable._
_RESELECT_
The flow for Reselect is: • Reselect opens a cursor to the database and populates it with all rows that meet the SQL Select conditions. • It then fetches the first row from the cursor and then closes thecursor.
• If no rows are found, the subsequent actions in the same step are skipped and the next step is run. • If a row is found, other actions within the same step are run. • THEN IT OPENS ANOTHER CURSOR, RE-RUNS THE SQL, AND REPEATS THELOOP.
• This process repeats until the select does not return any rows. • Any Commits or checkpoints contained within the loop will beperformed.
Reselect opens and closes a cursor for each row to be retrieved_RESTARTABLE_
The flow for Restartable is: • Restartable opens a cursor to the database and populates it with all rows that meet the SQL Select conditions. • Then it fetches the first row from the cursor. • If no rows are found, the subsequent actions in the same step are skipped and the next step is run • If a row is found, other actions within the same step are run. • Then it returns to the open cursor to fetch the next row. • This process repeats for every row in the cursor • Any Commits or checkpoints contained _within _the loop will beperformed.
Restartable performs the same as Select/Fetch, except that a checkpoint is issued. _WARNING! _Developers need to make sure that the SQL they include within this Action is such that, upon restart, it recognizes where the previous run failed and where to restart processing. There are various techniques you can use to achieve this, such as employing a “processed” switch, or to base the next Select on the key. The reason Commits within the loop are ignored is because of limitations of the checkpoint written to the PS_AERUNCONTROL table. The checkpoint has no way of recording where inside a loop the process left off. Therefore a restart at the exact point within theloop is impossible.
USING RESTARTABLE (CONTINUED) ENSURING THAT ROWS ARE NOT PROCESSED TWICE You need to have some conditions that reduce the answer set returned by the Do Select to ensure that the program does not process rows again if restart is necessary.Options include:
• Delete processed rows. • Add a switch to the selected table. • Add an order by clause. _EXAMPLE OF A SWITCH_ SELECT COLUMN1, COLUMN2,…FROM PS_TABLE1
WHERE PROCESSING_SWITCH = 'N' … _EXAMPLE OF AN ORDER BY CLAUSE_%SELECT(FIELD1)
SELECT FIELD1
FROM PS_SOME_RECORD
WHERE FIELD1 > %BIND(FIELD1)ORDER BY FIELD1
_DO WHEN_
Do When:
• Contains SQL that tests for a condition. • Comes first in the execution order within a step. • Is a Select statement that allows subsequent actions to be executed if any rows of data re returned (if TRUE). • Terminates the entire step when FALSE. No other actions in thestep are executed.
Do When is similar to an If statement in a programming language. A Do When statement runs before any other actions in the step. If the Do When statement returns any rows, the next action will be executed. If the Do When conditions are not met, the remaining actions within that step are not executed. A Do When action is executed just once when a step is executed. Think “Do once if true.”_DO WHILE_
Do While:
• Contains SQL that tests for a condition. • Executes after a Do When, if present, in execution order. • Is a Select statement that allows subsequent actions to be executed if any rows of data are returned. • Loop continues as long as the condition tests TRUE. • Terminates the step when FALSE. No further actions in the stepare executed.
The Do While Action is a Select statement that runs before subsequent actions of the step. If the Do While returns any rows of data, the subsequent actions in the step will be executed. The Do While action runs each time before the next action is repeated. If no rows are returned, Application Engine will move on to the next step or section. The Do While is identical to the WHILE function in other programminglanguages.
In short, if the Do While does not return any rows, the step iscomplete.
DO WHILE WORKS THE SAME AS A DO SELECT WITH THE RESELECT OPTION, inthat the cursors
open and close on every iteration of the loop. This causes the SQL to be compiled and executed on each iteration of the loop. If the counter is less than 1000, the condition is TRUE and the action is executed. In this case, the action is to add 1 to the counter. The loop will continue adding until the counter reaches1000.
When the counter = 1000, the Do While is FALSE and the program movesto the next step.
_DO UNTIL_
Do Until action characteristics: • Contains SQL that tests for a condition. • Runs _After _all other actions in the step. • Actions in the Step are executed at least once prior to testingthe condition.
• Loop continues as long as the condition tests false (SQL returns0 rows).
• Terminates the step when TRUE. A Do Until Action is a Select statement that runs after each action within a step. If the Select returns any rows of data, the stepterminates.
Use a Do Until if you want the “processing actions” to execute at least once, and to execute over and over until a certain condition is true, as in until a Select returns some rows. YOU CAN ALSO USE A DO UNTIL TO STOP A DO SELECT PREMATURELY. FOR EXAMPLE, IF THE SELECT FOR THE DO UNTIL DOES NOT RETURN ANY ROWS, THEN THE ACTIONS IN THESTEP ARE REPEATED
(except if a Do When appears in the step). Normally, a DO Select continues until no rows are returned. If any rows of data are returned, the DO Until stops and the actions in the step are notrepeated.
Loops as long as condition is FALSE. This is the same as a REPEAT UNTIL loop in other programminglanguages.
Use a Do Until if you want the processing actions to execute at least once, then execute over and over until a certain condition is true, as in until a Select returns some rows. Because the task action is performed before the Do Until, it will always execute at least once. The condition is checked. If it is TRUE i.e. the counter >1000 then the next step is executed. If the condition is FALSE, then the loop continues until it is true.SELECT 'X'
FROM PS_INSTALLATION WHERE %Bind(COUNTER) < 1000; _ORDER OF EXECUTION_ Multiple action types must execute consistently among one another, so the order in which actions execute is significant. At runtime, actions defined for a given step are evaluated based on their action type. All of the actions types exist within a strict hierarchy of execution. (For example, if both a Do When and PeopleCode action exist within a given step, the Do When is always executed first.) The order of execution within a step is:• Do When
• Do While
• Do Select
• PeopleCode
• SQL/CALL SECTION• Log Message
• Do Until
• XSLT
APPLICATION ENGINE LIBRARY An Application Engine library: • Is a collection of shared Application Engine program sections • Contains sections defined as Public. • May not be defined to run standalone. • Does not require a MAIN Section. • Is _not _intended to store a specific SQL action within asection.
PEOPLECODE IN APPLICATION ENGINE PROGRAMS When to use PeopleCode in Application Engine: • Testing for conditions (If-Then-Else). • Computing (for example: calculations, string manipulation). • Performing data preparation tasks (for example, evaluating datafrom run controls).
• Building dynamic portions of SQL, while still relying on SQL to complete the bulk of the actual program processing. • Reusing online logic that is already developed (for example,:Funclibs).
• Accessing new PeopleTools functions in PeopleSoft 8 With PeopleCode actions, your Application Engine programs can solve a wider range of business problems with added flexibility. However, when using PeopleCode in Application Engine programs, it’s important not to lose sight of Application Engine’s purpose. Application Engine is a development tool that allows you to develop programs to execute SQL, in batch and online mode, against your data in a procedural and dynamic structure.REFERENCING FIELDS
Follow these guidelines when referencing fields in PeopleCode within Application Engine programs: • RECORD.FIELD references can only refer to fields that exist on astate record.
&Name = EMPLOYEE.NAME; &Name = GetRecord(RECORD.EMPLOYEE).GetField(FIELD.NAME).Value; • Page buffers, controls, and other field objects are notaccessible.
Any RECORD.FIELD references that appear in a PeopleCode action can only refer to fields that exist on an Application Engine state record. Page buffers, controls, and so on are inaccessible even if you define the page records as state records on the Program Properties dialog. An Application Engine program can only access state records or definitions you create in PeopleCode. &Name = EMPLOYEE.NAME; &Name = GetRecord(RECORD.EMPLOYEE).GetField(FIELD.NAME).Value; THE IF-THEN STATEMENT The parameter in the Exit function controls the path the Application Engine program will take. • “1” indicates that the On Return instruction will beexecuted.
• “0” tells the program to ignore the On Return action.For example:
If &Test = 10 Then
Exit(0); /* or can use Exit 0; */Else
Exit(1); /* or can use Exit 1; */End-If;
The setting of the Exit can cause the next Application Engine step to conditionally be skipped. Note that if unspecified, “0” is the default, non-error condition, and “1” indicates an error.ON RETURN
The On Return options are: • _Abort _The program issues an error and exits immediately. • _Break _The program exits and control returns to the callingstep.
• _Skip Step _The program exits the current step, and continueswith the next step.
ENABLING A DYNAMIC CALL To enable a dynamic call: 1. Add a PeopleCode action. 2. In the action, based on a condition test, store a program name and a section name in the state record. The two fields used with dynamiccalls are:
• AE_APPLID for the Application Engine program name. • AE_SECTION for the Application Engine section name. • The fields must be populated, typically using PeopleCode. • The fields must exist in the _default _state record. 3. Following the PeopleCode action, add a Call Section action withthe Dynamic Call
checkbox selected.
SET PROCESSING
Set processing:
• Only selects those rows that meet the filtering criteria • Executes business rules once against all selected rows • Pushes processing to the RDBMS rather than in the ApplicationEngine Program
• Uses UPDATE or INSERT/SELECT or DELETE SQL to process sets orgroups of
rows at one time
SET PROCESSING ADVANTAGES Set Processing advantages include: • Improved performance. • Minimized (PeopleTools) SQL overhead. • Simplified maintenance. • Leverages RDBMS resources.TEMPORARY TABLES
Set processing can make use of temporary tables to preselect data that can then be handled via a single SQL statement. Temporary tables are designed to: • Hold transaction data for the current run or iteration of yourprogram.
• Contain only those rows of data affected by the business rule. • Present key information in a denormalized form. • Switch the keys for rows coming from the master tables if needed. ----------------------PARALLEL PROCESSING
Parallel processing is the simultaneous execution of multiple instances of a single program. Uses of parallel processing include: • Concurrent execution of a program by multiple users. • Reduction of processing time by partitioning high volumes of data into batches to be processed by separate instances of a program. ONLINE AND BATCH METHODS When Application Engine programs are run in parallel, they are run in one of two methods: • Online (synchronously) – implemented through a code callappengine() function. • Batch (asynchronously) – implemented through a process definition initiated via the Process Scheduler. Due to the differences in execution of these two methods the temporary tables used must be segregated. STEPS TO IMPLEMENT PARALLEL PROCESSING The steps to implement parallel processing are: 1. Define your temporary tables. 2. Set or check the temporary table online pool. This is a global setting and is usually established at installation time. 3. Assign temporary tables to be dedicated to each Application Engineprogram.
4. Set the number of dedicated temporary tables to form the number of temporary tables to be created for the process to be run in parallel. 5. Build or rebuild your temporary table record to create the appropriate number of temporary table instances assigned to the Application Engine parallel process. 6. Adjust your program meta-SQL (i.e. %TABLE) to resolve the data set to the appropriate application engine process being run in parallel.._
_
_STEPS TO IMPLEMENT PARALLEL PROCESSING_ There is no simple switch or checkbox that enables you to turn parallel processing on and off. To implement parallel processing, you need to complete a set of tasks in the order that they appear in thefollowing list.
1. Define your temporary tables with a Type of Temporary Table. 2. Set or check the temporary table online pool. This will set the basic temporary table online pool based on the PeopleTools Options specifications. This setting is a global number, in that it affects every temporary table in your database being initiated through the function callappengine(). If this global online number is changed then every temporary table must be rebuilt. 3. Assign temporary tables to your Application Engine program in its Program Properties, setting the appropriate number of Instance Counts and Runtime option. The runtime option dictates whether to allow another process to be initiated if all application engine dedicated temporary tables are in use (continue option) or whether to inhibit the process from being initiated again until an available temporary table has been released (abort option). 4. Set the Temporary Table Batch Pool by setting the instance count in the program properties specific to each application engine program to be run in parallel.. 5. Build or rebuild your temporary table record. This will build the necessary batch temporary tables into that record’s temporary table pool for use at execution time for that unique application engineprogram.
_WARNING! _If you choose not to include PROCESS_INSTANCE as a key field in a Temporary Table, you should change the Temp Table runtime options to _Abort _in the appropriate Application Engine programs. This is to ensure your program does not use the shared base table. IMPORTANT! Temp Table Instances (Total) and Temp Table Instances (Online) should always be the same value except in a PeopleSoft Enterprise Performance Management (EPM) database. IMPORTANT! If you change the values for Temp Table Instances in PeopleTools Options, you need to log off your connection and log back on again for the new value to be utilized properly. You will also need to rebuild all of your temporary tables. If you lower the number, you will need to manually drop the additional, now unused,tables.
IMPORTANT! Anytime you change the instance counts, you need to rebuild the temporary tables to ensure that the right number of instances get created and are available for your programs. The _Runtime _group box has two options for “If non-shared Tables cannot be assigned.” This is the action the Application Engine will take if batch/dedicated tables cannot be allocated at runtime. • Continue The base table will be used instead. • Abort Inhibits the program from initiating when temp tablesexhausted
The question is: How many tables do your processing programs needconcurrently?
If you intend to run AE1, AE2, and AE3 independently in parallel, you will need all seven instances of the temporary table. The actual number of batch temporary tables built is the sum of the instance counts in all the programs that have assigned that table as a temp table. The instance count value is not how many SQL table instances that program can use, it is how many instances that program is going to send to the batch temp table pool. Once the batch pool is created it is a community pool and all programs can use all and any instances in the pool for the temporary tables assigned to it. Adjust your program Meta-SQL to resolve the application engine program to the temporary table assigned to it’s process at runtime.
• Table references must be set up using %Table. • To add rows to temporary tables, you must provide the process instance number using either: • %ProcessInstance • %Bind(PROCESS_INSTANCE) • While assigned Temporary Tables are cleared at the start of processing, no automatic deletes happen during or at the end of the program. You may want to consider using an action containing_%TABLE_
If you defined your Application Engine program to have no batch/dedicated tables the %Table in the Select will be resolved to the base temporary table: CallAppEngine PeopleCode does not issue Commits. All commits are issued from within the Component Processor, which would include PeopleCode commands like SavePost Change. Be aware, in 8.4 PeopleCode now issues a commit after FieldChange. So, if you use CallAppEngine from FieldChange, there will be a Commit issued, even before you hitthe save button.
Use synchronous execution when: • Processing should be of short duration. • Processing requires some task to complete before further processing can occur. • Application Engine performs a SQL task more efficiently than someother methods.
• A developer will be able to take advantage of existing Application Engine resources. CALLAPPENGINE starts the Application Engine program named _applid. _This is a way of starting your Application Engine programs synchronously from a page. The syntax is: CALLAPPENGINE(applid ); Where statereclist is list of record objects in the form: &staterecord1 . . . There can only be as many record objects in _statereclist _as there are state records for the Application Engine program. Additional record objects will be ignored. Below is sample code to pass a record object from the Component buffer to the CallAppEngine function in order to populate the Application Engine program’s staterecord(s).
/* Instantiate the record */ &st_pshup_aet = createrecord(record.st_pshup_aet); /* Populate the values */ &ST_PSHUP_AET.EMPLID.Value = ST_GRANT_EXER.EMPLID; /* Call the AE program */ CallAppEngine(“ST_DEL_ETAX”, &ST_PSHUP_AET); This table lists the minimum parameters that are required in addition to the path where PSAE.exe resides: _DESCRIPTION PARAMETER_ Database platform (e.g. Microsoft, Oracle, DB2, etc.) -CTPROCESS TYPE
Process Type definitions define parameters common for an entire _family _of processes. Process Type definitions are used to globally define: • The parameter list. • The command line. • The working directory. Each new Application Engine program needs to be added to the list of processes for the same type. Parameters are in the form of meta-strings. PURPOSES OF PROCESS DEFINITIONS A process definition serves four primary purposes: • Identify the _type _of process to be run. • Identify the _program _name to be run. • Identify _from where _the program is to be run. • Identify _who _has security access to run the program. _____________________________________________________________________________________________ Trace – override options in process page. -TRACE 384 -TOOLSTRACESQL 31 -TOOLSTRACEPC 2048Component :
PRCSMULTI
AE_REQUEST
%Sql(BO_BAS_TRUNC_ORG_TMP1) = run the SQL query created in sqlobject.
Posted by Shilsagar Belekarat 4:07 PM
No comments:
Links to this post
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
Labels: Application Engine,
Disable restart
,
Parallel Processing
,
Sections
,
Steps
Older Posts
Home
Subscribe to: Posts (Atom)BLOG ARCHIVE
* ► 2013 (18)
* ► August 2013
(13)
* ► September 2013(3)
* ► October 2013(2)
* ▼ 2014 (2)
* ► August 2014
(1)
* ▼ September 2014(1)
* C H A P T E R 20 Modify SES for Recruiting careers...ABOUT ME
* Shilsagar Belekar
Sydney, New
South Wales, Australia Shilsagar has more than 7 years of experience in PeopleSoft. View my complete profile Awesome Inc. theme. Theme images by fpm.
Powered by Blogger .Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0