PS: PeopleSoft IB connecting to pub/sub in GCP
![]() | Hello Gillian, This is Jordy from Integration Tools team, I received your case today and will assist you. I have done some research for your question: Does PeopleSoft IB connects or has delivered integrations to work with Google Cloud Platform (GCP)? From IB framework perspective, we can manage to connect to any third party supporting REST and SOAP (PUB/SUB), you can build your own Service/Service Operation to integrate with Google Cloud Platform (GCP) if it does support REST and SOAP calls/requests. We do not have specific or delivered integrations for GCP. You can refer to the Integration Broker documentation in the following URL for 8.58: https://docs.oracle.com/cd/F44947_01/pt858pbr3/eng/pt/tibr/task_PeopleSoftIntegrationBrokerOverview-07659b.html Let us know if you have any comment or question. Regards, Jordy |
Yes, PeopleSoft can access a Google Cloud Platform (GCP) bucket. To achieve this, you need to configure the appropriate permissions and access controls on the GCP bucket. Here are the general steps:
1. Set Up IAM Roles: Use Google Cloud’s Identity and Access Management (IAM) to grant the necessary permissions to the service account that PeopleSoft will use to access the bucket. Common roles include Storage Object Viewer for read-only access or Storage Object Admin for full control1.
2. Service Account Key: Generate a service account key in GCP and securely store it. This key will be used by PeopleSoft to authenticate and access the bucket2.
3. Configure PeopleSoft: In PeopleSoft, configure the integration to use the service account key to authenticate with GCP. This typically involves setting up the necessary API calls and ensuring the service account has the correct permissions3.
4. Access Control Lists (ACLs): If you need more granular control, you can also use Access Control Lists (ACLs) to specify permissions for individual objects within the bucket1.
By following these steps, you can enable PeopleSoft to interact with your GCP bucket securely and efficiently. If you need more detailed guidance, the GCP documentation provides comprehensive instructions on setting up IAM policies and managing access12.
Is there a specific task you’re looking to accomplish with this integration?
1. Yes, you can send a file to a Google Cloud Platform (GCP) bucket using PeopleCode. Here’s a general outline of how you can achieve this:
1. Generate a Service Account Key: First, ensure you have a service account key from GCP with the necessary permissions to access the bucket.
2. Use PeopleCode Functions: PeopleCode provides functions like AddAttachment and ViewAttachment that can be used to handle file uploads. You can use these functions to upload a file to a temporary location and then use a custom PeopleCode script to transfer the file to the GCP bucket.
3. Custom PeopleCode Script:
Upload the File: Use the AddAttachment function to upload the file to a temporary location.
Transfer the File: Write a PeopleCode script to transfer the file from the temporary location to the GCP bucket using the GCP API.
Here’s a simplified example of how you might structure the PeopleCode:
/* Define file sub-record */
Local string &URL_ID = "record://XX_FILE_TMP";
Local string &InOutAttachSysfilename, &InOutAttachUserfile;
Local integer &InMaxSize = 0;
Local integer &Result;
/* Save the current page */
DoSaveNow();
/* Prompt the user for a file */
&Result = AddAttachment(&URL_ID, &InOutAttachSysfilename, "", &InOutAttachUserfile, &InMaxSize);
/* Check for file upload error */
If &Result <> %Attachment_Success Then
Error "Error in file upload: " | String(&Result);
End-If;
/* Transfer the file to GCP bucket using GCP API */
Local string &GCP_Bucket_Name = "your-gcp-bucket-name";
Local string &GCP_File_Path = "path/in/gcp/bucket/" | &InOutAttachSysfilename;
/* Use GCP API to upload the file */
UploadToGCPBucket(&InOutAttachSysfilename, &GCP_Bucket_Name, &GCP_File_Path);
In this example, UploadToGCPBucket would be a custom function you create to handle the interaction with the GCP API, using the service account key for authentication12
2.
To use gsutil in PeopleCode to copy a file to a Google Cloud Platform (GCP) bucket, you can follow these steps:
1. Ensure gsutil is Installed: Make sure gsutil is installed and configured on the server where your PeopleSoft application is running. You can install it as part of the Google Cloud SDK.
2. Generate a Service Account Key: Obtain a service account key from GCP with the necessary permissions to access the bucket.
3. Write PeopleCode to Execute gsutil Command: Use the Exec function in PeopleCode to run the gsutil command. Here’s an example:
Example PeopleCode Script
/* Define the file paths */
Local string &LocalFilePath = "path/to/local/file";
Local string &GCPBucketName = "your-gcp-bucket-name";
Local string &GCPFilePath = "path/in/gcp/bucket/file";
/* Command to upload the file using gsutil */
Local string &Command = "gsutil cp " | &LocalFilePath | " gs://" | &GCPBucketName | "/" | &GCPFilePath;
/* Execute the command */
Local integer &ReturnCode;
&ReturnCode = Exec(&Command, %Exec_Asynchronous + %Exec_Synchronous);
/* Check for errors */
If &ReturnCode <> 0 Then
Error "Error in uploading file to GCP bucket: " | String(&ReturnCode);
End-If;
Steps Explained
1. Define File Paths: Set the local file path, GCP bucket name, and the desired path within the bucket.
2. Construct the Command: Create the gsutil cp command string to copy the file from the local path to the GCP bucket.
3. Execute the Command: Use the Exec function to run the command. The %Exec_Asynchronous + %Exec_Synchronous flags ensure the command runs synchronously, meaning PeopleCode waits for the command to complete before proceeding.
4. Error Handling: Check the return code from the Exec function to determine if the command was successful. If not, handle the error appropriately.
Additional Considerations
• Service Account Authentication: Ensure that the service account key is properly configured and accessible on the server. You might need to set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to your service account key file.
• Permissions: Verify that the service account has the necessary permissions to write to the GCP bucket.
Comments
Post a Comment