GetOAuthToken Example
The GetOAuthToken process demonstrates how an OAuth token is generated and used in other activities to work with the data stored on the server.
GetOAuthToken Process
The GetOAuthToken process is illustrated here:
Process Definition
The process generates an OAuth token which is then used to create a patient record and delete an existing patient record. To generate an OAuth token, a FHIR Authentication shared resource has been configured by providing Client ID, Client Secret, Scope, and Token Endpoint. A FHIR server has also been configured. The following operations are performed when you run the process:
- The Timer activity starts the process.
- The GetOAuthToken activity generates the token.
- The token generated by the GetOAuthToken activity is passed to the CreatePatientWithToken activity and a patient record is created. The activity outputs the ID of the patient record generated.
- The ID of the patient and the OAuth token are passed as input to the DeletePatient activity and the corresponding record is deleted from the server.
- After the process executes successfully, a Success message is written to the Console. Select in TIBCO Business Studio to view the log messages.
- The output of the GetOAuthToken activity is an OAuth token.
- The CreatePatientWithToken activity generates a patient record and returns the patient ID.
- The DeletePatient activity successfully deletes the patient record.