Monday 12 September 2022

iCal Expressions

 


FREQ=DAILY;BYHOUR=4,5,6,7,8,9,10,11,12,13,14,15,16,17,18;BYMINUTE=0,10,20,30,40,50;BYSECOND=0;

FREQ=MONTHLY;BYMONTHDAY=1,10,15;BYHOUR=5,10,15,20;BYMINUTE=15;

FREQ=YEARLY;INTERVAL=3;BYMONTH=3;BYDAY=2,22;

<Every Three years on May 2nd and 22nd >


BYYEARDAY

BYWEEKNO

BYMONTH

BYSETPOS

WKST


FREQ= “SECONDLY” / “MINUTELY” / “HOURLY” / “DAILY”/ “WEEKLY” / “MONTHLY” / “YEARLY”

hour = 1DIGIT / 2DIGIT ;0 to 23

weekday = “SU” / “MO” / “TU” / “WE” / “TH” / “FR” / “SA”





Mule - API Designer - RAML - API First Development

Mulesoft support API First development method by using API Designer and Exchange server. This feature help the organizations are define and publish standard and reusable API's.  

As part of  API first development strategy, we can define API's , get it reviewed by different LOB, stake holders and publish the final API for discovery and consumption.   

This will help the organization to streamline the development process by reusing existing API's and speedup the delivery process. 

Mulesoft provides API Designer to design and develop API definitions. API Designer will use RAML specifications to define an API. 

API designer will provide mock service capabilities to test the API definition.  We can use the Public endpoints to test the API definitions from Postman or Advanced Rest Client.

We can publish the API definition to Mulesoft Exchange server and this will create an API portal . API portal provides a console for documentation, mock service and sharing capabilities. 

We can  share the API definition with users within our organizations and with public users (Client applications) .

User can discover API definition , verify using mock service and consume the API for processing requests. 

Follow below steps to access, design and develop API's using Mulesoft. 

  • Access following any-point URL by providing login credentials   - https://anypoint.mulesoft.com/
  • Click the burger menu (Left side) to access the Mulesoft offerings. 
    • Design Center -  API designer
    • Exchange Server
    • Management Centre. 
  • Use Design Center to design API's
    • Select Create New to create 
      • API Specification 
      • New Mule App - Flow design
      • New Fragment
      • New Async API
    • We will API Specification to create New API
      • Provide a Project Name - Example Common Integration Pattern
      • Select Comfortable designing on my own option with RAML 1.0 option
      • This will create - Common-Integration-Pattern.raml file
      • RAML uses YAML standards to define API
      • You will see four windows
        • Left - File Browser 
        • Right - API Console
        • Center - Editor Window
        • Bottom - Shelf 
      • RAML is indent based definition. Make sure we will follow the right indentation. 
      • Based on the indentation , Shelf will display the corresponding tags we can add. 
      • Center window will display the RAML version which we have selected and the project name which we have provided. 
      • Under this we can add Root elements . 
        • baseUri - To specify the base URL
        • Protocol - HTTP/HTTPS
        • Version 
        • etc
      • I will provide the baseUri: https://svn-ics-enterprise.com
      • Under this provide the context URL
        • /submitIntegration :
      • Under the context URL , provide the HTTP methods
        • get
        • post
      • We can provide URL parameter under base context URL. Make a note of indentation.
/submitIntegration :
  get:
  post:
  
  /{IntegrationRunId}:
      • We can provide the http methods allowed for each context URL paths 
      • Under each HTTP method we can mention the content type and query parameters. 
      • We can create a Folder and add data model (Data Type)
      • Left side under file browser select +
      • Select Folder
      • Provide a name - DataModel
      • Under DataModel select +
        • Add Data Type file to define the Request and Response Structure. 
          • Select File Type as Data Type from the list. 
          • Add the data type object 
          • Refer below sample 
        • Add Example file to define sample request and response Message. 
          • Select file type as Example
          • Add Sample Values
          • Refer below sample
      • Publish the API definition to Exchange Server. 
        • Use the publish option on the right corner
        • Provide the version number



Sample RAML File: 


#%RAML 1.0
title: Common Integration Pattern
#baseUri: https://svn-ics-enterprise.com

types:
  RequestMessage : !include /DataModel/IntegrationRequestType.raml

/submitIntegration :      
  post:
    body:
      application/json:
        type: RequestMessage
        examples:
          input: !include /DataModel/IntegrationRequestExample.raml
    responses:
      200:
        body:
          application/json:
            type: object
            example:
              Message: "Successfully Submitted"

  get:
    queryParameters:
      IntegrationCode:
        required: true
    responses:
      200:
        body:
          application/json:
            type: RequestMessage
            examples:
              output: !include /DataModel/IntegrationRequestExample.raml

  /{IntegrationRunId}:
    get:
      responses:
        200:
          body:
            application/json:
              type: RequestMessage
              examples:
                output: !include /DataModel/IntegrationRequestExample.raml

                

Sample Data Type:

#%RAML 1.0 DataType

type: object
properties:
  "IntegrationCode": string
  "RunBy": string
  "Status": string
  "RunId": integer
  "TransactionId": string
  "Output": string
  "ErrorCode": string
  "ErrorMessage": string
  "Parameters": 
    type: array
    items: ---> Mandatory for adding array of elements. Array Type should have items under it.
      properties:
        "ParameterName": string
        "ParameterValue": string
        "ParameterScope": string
        "ParameterType" : string
        "ParameterSequence": integer



Sample Example Value File:

#%RAML 1.0 NamedExample

value:
  IntegrationCode: ProcessInvoice
  RunBy: VijayaKumar
  Status: Start
  RunId: 1234
  TransactionId: abc1234
  Output: Success
  ErrorCode: XXXX
  ErrorMessage: Sampl Error
  Parameters:
  -
      ParameterName: InvoiceType
      ParameterValue: CreditMemo
      ParameterScope: Step
      ParameterType: BIP
      ParameterSequence: 1
  -
      ParameterName: Supplier
      ParameterValue: SaanviNihal
      ParameterScope: Step
      ParameterType: BIP
      ParameterSequence: 2
  

Database Admin Commands

Use the following commands to test the connection and configurations. 

  • Check the listener status
    • lsnrctl status <Alias_FROM_listener_Or_TNSnames_ORA>
  • iSQL command to access Postgres database.
    • isql <alias_name> -v

IDCS - Identity Federation with Azure and Google (SAML IDP & Social IDP)

  Collect IDCS Meta Data Enable "Access Signing Certificate" option to get the IDCS metadata.   Default Domain Settings ->  Sel...