Friday, 18 December 2020

isp Invoice

IspCreatePoInvFlow

  • IspCreateEditInvoiceFlowTF -> closeMainTaskhttps://codesearch.oraclecorp.com/cs/xref/FUSIONAPPS_PT.V2MIBFPHDEV_LINUX.X64/fusionapps/prc/components/supplierPortal/pos/overviewPage/ui/adfmsrc/oracle/apps/prc/pos/overviewPage/ui/page/ApEnterUnMatchedPayablesInvoicePageDef.xml


    https://codesearch.oraclecorp.com/cs/xref/FUSIONAPPS_PT.V2MIBFPHDEV_LINUX.X64/fusionapps/prc/components/supplierPortal/pos/overviewPage/ui/adfmsrc/oracle/apps/prc/pos/overviewPage/ui/page/ApEnterMatchedPayablesInvoicePageDef.xml

     

    ispEnterInvDetailsPFPageDef

     

ispCreateUnmatchedinvFlow -> IspCreateEditInvoiceFlowTF

  • initMoac()
  • beginTransaction()
  • initRefreshTaxTF()
  • refreshRouter
  • CreateNewIspInvoice()
    • EnterInvDetails
      • CancelFromPortal
        • Cancel
      • Saveandclose

Running the isp project

 

 

cd fusionapps/fin/components/payables/ap/invoices/ispInvoices/model/
ade co fusionapps/fin/components/payables/ap/invoices/ispInvoices/model/FinApInvIspInvoicesModel.jpr

gedit jpr

ade co -nc fusionapps/fin/components/payables/ap/invoices/ispInvoices/uiModel/FinApInvIspInvoicesUiModel.jpr


  • To avoid errors when UI is opened
    • copy hcm jar to project
      • ade co -nc fusionapps/fin/components/payables/ap/invoices/transactions/model/FinApInvTransactionsModel.jpr
      • gedit fusionapps/fin/components/payables/ap/invoices/transactions/model/FinApInvTransactionsModel.jpr
        • search for ADFBC Imports and add following entry
        • <url path="../../../../../../../jlib/AdfHcmSecurityCommonPublicModel.jar" jar-entry=""/>
        •  

http://indl140191.in.oracle.com:7101/ispInvoices-FinApInvIspInvoicesUI-context-root/faces/IspInvoicesWorkArea 

svsuppa01/Welcome1

Tuesday, 1 December 2020

ADE

  • home/vdesu/ade/create
    • ade createview fphdev -series FUSIONAPPS_PT.V2MIBFPHDEV_LINUX.X64
    • ade begintrans -bug 123
    • jdev &
  •  home/vdesu/ade/refresh
    • ade refreshview -latest
    • exit
    • ade useview fphdev
    • jdev &
  • $AVR -> ADE_VIEW_ROOT
  • Checkout & copy payables.jws from /home/vdesu/ade
  • Build domain and copy /scratch/vdesu/WLS_Users_and_Groups.ldift
  • rm -rf .jdev_user_home/
  • To display Tiles
  • To avoid errors when UI is opened
    • copy hcm jar to project
      • ade co -nc fusionapps/fin/components/payables/ap/invoices/transactions/model/FinApInvTransactionsModel.jpr
      • gedit fusionapps/fin/components/payables/ap/invoices/transactions/model/FinApInvTransactionsModel.jpr
        • search for ADFBC Imports and add follwoing entry
        • <url path="../../../../../../../jlib/AdfHcmSecurityCommonPublicModel.jar" jar-entry=""/>
    • invoiceditpf.jsff
      • remove DescriptiveFlexfield tag for PJCDFFVA
      • <!-- .....        -->
  • Tools -> preferences -> file types-> jsff label -> default editor -> source
  • stop server and restart
  • http://indl140191.in.oracle.com:7101/transactions-ui-context-root/faces/FndOverview?fndGlobalItemNodeId=itemNode_payables_payables_invoices
  •  

Sunday, 31 May 2020

Security


Role Based Access Control(RBAC)
  • Roles
    • Duty role
    • Abstract role
    • Job role
  • Privileges
    • Function Security Privilege
    • Data Security Privilege
  • Implementation Users
    • Application Implementation Consultant
    • IT Security Manager
    • Can have abstract roles like Employee, or Manager
  • Application Users 
    • Should have abstract roles like Employee, or Manager 
    • MyTeam -> Manage Users
Role Types
  • Job Role -> Roles performed at a job function
  • Abstract Roles -> for common functions like employee role
  • Duty Role -> Individual duty functions like Invoice creation, payment creation
Data Roles vs Data access
  • When a Ledger is created, Data Access Set is created with same name

Role Provisioning
  • Employee Role assigned when
    • Person type is Employee & HR assignment status is Active
  • Manager Role assigned when  
    • Person type is Employee, HR assignment status is Active & Manager with reports
Payables Security
  • Function Security
    • Edit Access
      • Accounts Payable Manager
      • Accounts Payable Specialist
      • Accounts Payable Supervisor
    • View Only access
      • Financial Application Administrator
      • Cost Accountant
      • Project Accountant
  • Data Security
    • Secure access based on BU
      • Invoices & Payments
 Security Console
  • This task is made available by adding role IT_SECURITY_MANAGER role
  • Roles Management
  • User Management
Practicals
  • Setup & Maintenance -> Manager Users -> 
  • Data Security
    • Setup & Maintenance-> Manage Data Access Set and Access for Users

select * from per_users where username like ‘AP%CUS%’;
 
select * from fusion.fnd_object_instance_sets where INSTANCE_SET_NAME like ‘FNDDOCUMENTCATEGORIESPOZ55%’;
 
select * from fusion.fnd_object_instance_sets where INSTANCE_SET_NAME like ‘FNDDOCUMENTCATEGORIESPOQ15%’;
 
select * from fnd_grants where instance_set_id in ( 300100110431046, 300100110431049)
--and ROLE_NAME in ( select role_name from fusion.FND_SESSION_ROLE_SETS where SESSION_ROLE_SET_KEY like ‘dQkIylMsQMB5KTs8rSmeEQ==’ ) ;
 
select * from FND_SESSIONS where user_guid like ‘C7A5D1052374BB05E050F80A98291B75’ order by last_connect desc ;
-- C7A68D683CB2235FE0539929F80AAE3E
 
select * from fusion.FND_SESSION_ROLE_SETS where SESSION_ROLE_SET_KEY like ‘dQkIylMsQMB5KTs8rSmeEQ==’ ;
 ----
 
select /*3-25921486741*/
Distinct bu_id,
bu.BU_NAME,
u.username,
role.ROLE_NAME,
role.START_DATE_ACTIVE,
role.END_DATE_ACTIVE,
role.ACTIVE_FLAG
from fusion.hz_parties h,
fusion.per_users u,
fusion.per_all_people_f f,
fusion.FUN_ALL_BUSINESS_UNITS_V bu,
fusion.FUN_USER_ROLE_DATA_ASGNMNTS role
where 1=1
and h.user_guid = u.user_guid
and u.person_id = f.person_id
and sysdate between f.effective_start_date and f.effective_end_date
and role.org_id = bu.bu_id
and u.USER_GUID = role.USER_GUID
and u.username='WH6066'
--and role.ACTIVE_FLAG='Y'
and bu_id=300000031108373
  
 
REST resource types
  • Transaction resource
  • Reference
  • Lov resource
Steps to define security
  • Register in ADR- Application Design Repository
    • http://fadr.us.oracle.com:7777/adrv1/SetupTaskList/faces/ADRDashboard
  • PM to log request on fin-security-cr
  • Create rest/soap resource
  • Register the service as jazn resource either as RestServiceResourceType or
    WebserviceResourceType in jazn-data.xml
  • Add resource to required privilege as member-resource
  • eg: https://orareview.us.oracle.com/88788650/diff_nowhite/88788651/88788705

     

Monday, 13 April 2020

IDR

Normalization
  • actually convert a pdf to text pdf
  • happens for PO & amount fields
Learnings doesn’t happen for Supplier name.. all other learnings happen from Supplier field



bounding box means

Pool1 & Pool2




Imaging
  • The schedule is missing in ODC import server.( shwetha.g.gopal@oracle.com - Cloud operations)
    While trying to add the schedule permission denied error is occurring, can you please check.

    Vendor & employee pool discussion
     



Tuesday, 7 April 2020

Jira

  • Jira is Project management & issue tracking tool.
  • It uses Agile methodology
 Agile Methodology
  • Software development methodology centered around helping teams get more stuff done by self-organizing 
  • It means constant change & evolve every day.
  • Ways to organize work in Agile methodology is Agile board. There are 2 key ways to organize the content Scrum & Kanban.
    • Scrum
      • has sprints
      • Sprint meeting 
        • start by discussing last sprint - what went well, what didn't go , what can we do better.
        • discuss and agree on work to be completed next sprint

    • Kanban
      • NO sprints
      • For ongoing projects
      • No sprint meetings
      • Standup meeting - A quick meeting where each member explains what was accomplished yesterday and the work they intended to do today. Any road blocks/issues that arose are discussed.

User Story
  • Help the developer get in the mind of end user for that functionality
    • As a <Type of user> I want <some goal> so that <some reason>
    • As a web developer I want to be able to add users to jira so that my coworkers can report bugs.
    • As a cashier, I want to have the total calculated for me so that I can give the correct change back to the customer
Epic
  • An epic is a big project that’s too big for a single sprint. It’s broken down into multiple user stories. When those are done, the epic is complete. 
Issues & Projects
  • Issues are heart of what you track in Jira. They are like blank post its with different colours.
    Eg: stories, epic , bugs are different type of issues in Jira. One can create custom issue type as well.
  • Issues hold fields that contain the data
  • All issues live inside project. Projects are containers for issues.


Thursday, 27 February 2020

ADF

Application Module
  • Expose view instances to UI/View layer.
  • Assign view criteria to view instances
  • Java classes
  • Configuration 
    • Datasource that is used when the application is deployed to weblogic server
    • Define pool configuration
  • Run and test the Application module
  • Java
    • It has all view object instances exposed to View Layer
    • Create your own business function and expose to view layer
    • Override afterCommit & afterCommit methods
    •  
Association
  • Connection/Link between two entities
View Link
  •  Link between two View Objects
  • It can be defined on view attributes OR on top of Association defined at entity level

ADF Logger
https://www.youtube.com/watch?v=o-2r-Max3II
http://tinyurl.com/adf-logging
  • System.out.println
    • You have to remember to remove it
    • no granularity
    • goes only to one place
    • It is meant for appln user and not for developer/admin
  • thin Wrapper on top of java.util.logging
  • private Static Logger logger = Logger.createADFLogger(<classname>);
    logger.info("information");

View Objects
  • Entity Based
  • SQL Query based
  • Static list
  • Programmatic
    • VO which is not based on query. One can define VO attributes and insert rows at runtime
    • Generate javaimpl & javarowimpl  
    • bind the ui elements to backing bean

View Criteria
  1. Filtering the main view data
  2. Search page
  3. List of Values input - > assign criteria
Java Code ->  Source -> override methods
  1. viewImpl.java
    1. executeQueryForCollection() -> set bind variable before the super method
    2. change sql
  2. viewRowImpl.java  (like entity object)
    1. Create()
    2. Remove()
View Layer
  • Application
  • Session
  • PageFlow 
  • Request
  • Backing bean
  • view
  • none
LOV Types:
  • Single Selection
    • ADF Select One Choice
    • ADF Select One Listbox
    • ADF Select One Radio
    • ADF Select Boolean Checkbox 
  • List Of Values
    • ADF LOV Input
    • ADF LOV Choice List
Client Side LOV
  • Create a new VO Attribute say InvoiceCurrencyCodeCsLOV
  • Add LOV as ComboLOV to the newly created attribute
  • Add custom attribute ListType and set value to inputSearch
  • Also, add LOVResource property and set values
  • Drag and drop Switcher & two facets within it
  • Drag the new attribute as LOV onto the page within Switcher facet. Delete the code generated as we use the wrapper API.
  • Infplace of deleted code, Drag FinClientSideLOV onto one facet and provide following properties
    • BusinessObject
    • LOV Binding
    • Value 
    • valueAttribute
  • Drag regular LOV code onto other facet
  • Optin stategy
    • Profile FUN_CLIENT_LOV_ENABLED to yes
    • To disable for AP incase of any errors, create Lookup Type 'AP_NEW_FEATURES' with lookupcode 'AP_DISABLE_CLIENTSIDE_LOV'

View Layer
 Table & Panel Collection

  • Make the table stretchable & with same width equally for each column
    • Table Properties -> Appearance -> Column Stretching ->Multiple
    • Appearances -> Set the width to 33% for all columns 
  • Display icon to clear table filters
    • Create a new column & set width as 14, rowHeader to True
    • Show index(rownum) for the rows in the header column
      • Insert output text under the rowHeader column
      • set the value property to #{row.index}
  • Table -> context menu
    • Table -> insert ContextMenu facet
    • insert popup -> Menu -> Menu item
  • Table -> Detail Stamp
    • Drag the child table
    • Table properties -> Behavior ->  RowDisclosureListner -> associate backing bean methold
      public void rowListner(RowDisclosureEvent rowDisclosureEvent){
      <<logic here>>
      }
  • Panel Collection features
    • Detach -> to show table in full screen
    • Control table filter
    • Control the Visible/hide columns 
    • Sorting & reorder columns
    • Column selection multiple -> Freeze & Wrap features can be used
    • Features OFF -> To disable certain features
REST
How to invoke Exposed REST service
Validator
  • Custom Validation at EO level
    • EO-> Business Rules-> Attribute level or entity level -> new validator -> method -> error message in failure handling tab 
    • java impl -> write the code in generated method -> the method should return true or false.
Converter
  • Store data in database in specific format but user should see it and enter it in different format.
  • Create a java class implementing javax.faces.convert.Converter
  • The interface has 2 methods getAsObject & getAsString. First one is to set the value & second one for getting
  • public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String str){
    if (str.length!=10)
    {
    FacesMessage message = new FacesMessage("incorrect length");
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    throw new ConverterException(message);
    }
    return "+91"+substr(str,1,11);
    }
  • public Object getAsString(FacesContext facesContext, UIComponent uIComponent, Object obj){
    String value = String.valueOf(obj);
    return "0"+substr(str,2,12);
    }
  • Register the class with faces-config -> Converters
  • How to apply converter to UI field
    • Input text item -> insert converter -> select the registered converter
    •  
BLOB - Uploading/downloading in ADF applications
  • Drag af:InputFile to toolbar
  • af:InputFile -> Value Change Listner -> add bean  method -> uploadImage
    public void uploadImage(ValueChangeEvent valueChangeEvent){
    UploadFile file = (UploadFile) valueChangeEvent.getNewValue()
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingEntry();
    DCIteratorBinding iter = () bindings.get("iteratorname");
    iter.getCurrentRow.setattribute("empimage", new BlobDomainForInputStream(file.getInputStream));
  • private BlobDomain newBlobDomainForInputStream(InputStream in){
    BlobDomain b = new BlobDomain();
    OutputStream o = b.getBinaryOutputStream();
    writeInputStreamtoOutputStream(i,o);
    }
  • private void writeInputStreamtoOutputStream(InputStream i, OutputStream o){i.close();
    byte[] buffer = new byte[8192];
    int bytesRead = 0;
    while ((byteRead=in.read(buffer,0,8192))!=-1) {
    out.write(buffer,0,byteRead);
    }
UI Components
  •  Panel box
    • Add content with a label/title
    • Has toolbar facet
    • It has DisclosureListner property for programatic control
    • Key properties
      • maximize property to show/hide the maximize icon
      • showDisclosure Property
      • Disclosed property
  • Panel Group layout
    • Layout property to select Vertical vs Horizontal
    • Valign property
Listners
  •  LOV
    • ValueChangeListner
    • LaunchPopupListner -> before popup is launched
    • ReturnPopupListner ->
  • TableSelection
    • SelectionListner
  • Popup
    • PopupFetchListner -> just before popup opens
    • PopupCancelListner ->
Classic Session Based Authentication: 
  • Client authenticates with server using user/passwd for the first time
  • Server creates a session and returns token
  • Client stores the token in cookie and sends the token in all subsequent requests.
REST APIs
  • REST is stateless - Server doesn't save any data that persists across requests.
  • Session based authentication doesn't work
  • Basic Auth(Credentials are sent in header for every request)
    • Client authenticates with server using user/passwd in every request.
    • Username & password is sent as part of request header in specific format
      • username:password and Base64 encode 
      • Authorization: Basic <encoded string>
    •  On server side-> system does base64 decoding
    • Encode string is not secure. Hence, send it over https protocol
    • Encoding is to make string HTTP compatible
    • Advantages
      • Simple, stateless & supported by all browsers
    • Disadvantages
      • Requires https
      • subject to replay attacks
      • logout is tricky(browser caching)
  • Digest access authentication
    • Encrypts and sends a secret
  • Asymmetric cryptography
    • public-private key cryptography
  • OAuth 
    • It is meant for Authorization
    • It is meant for service to authorize another service
    •  
  • JSON web tokens
Tuning and control weblogic memory
  • Jdev -> tools-> preferences-> file types-> default editor -> source
  • Jdev -> tools-> preferences->Code editor -> Save actions -> delete the build project on save option
  • Increase memory allocation for jdev editor
    • OS location where Jdev is installed -> jdeveloper -> ide -> bin ->  ide.conf -> add VM option 
  • Increase memory allocation for embedded weblogic server
    • help -> about -> properties -> configuration area property -> get os folder name -> DefaultDomain -> bin -> setDomainEnv.cmd ->

Friday, 21 February 2020

Shared Application Module

  1. Create custom application with one module
  2. Create all ADF BC components
  3. Define datasource in application module
  4. Model project -> generate ADF library jar file
  5. Add the jar to main ADF application