I’m working on a Windows-based workflow where I need to interact with a Google Cloud Storage (GCS) bucket. My goal is to iterate over each file in the bucket and pass it to the Classify Document activity, which expects a File type as input.
Here’s what I have so far:
Google Cloud Scope: I’ve successfully configured this with my Service Account JSON file.
Get Bucket Activity: I’m able to retrieve the bucket information.
The Gap: I am struggling to figure out how to:
List all the files/objects in the GCS bucket.
Iterate through them and convert each object into a format that the Classify Document activity can accept (a File type or a valid file path).
If anyone has experience with this or can provide guidance on listing GCS bucket files and integrating them with the Classify Document activity, I would greatly appreciate your help.
Thank you for your guidance on using the For Each Object in Bucket and Download Object to File activities to process files from a Google Cloud Storage bucket and pass them to the Classify Document activity.
However, when implementing this approach, I encountered the following error:
“The specified Activity definition contains multiple languages of expression activities that require compilation (languages discovered: ‘C#’). Only one language requiring compilation is allowed per definition. Please convert all expression activities that require compilation to a single language.”
This error suggests that my workflow contains activities using different expression languages, leading to a compilation issue.
Steps Taken:
Configured Google Cloud Scope: Successfully connected using the Service Account 2. Implemented For Each Object in Bucket: Set up to iterate over each file in the bucket.
Added Download Object to File: Placed within the loop to download each file locally.
Integrated Classify Document: Attempted to process the downloaded files.
Encountered Issue:
Upon running the workflow, the aforementioned error regarding multiple expression languages appeared, preventing execution.
Request for Assistance:
Could you provide guidance on how to resolve this issue? Specifically:
Identifying Mixed Expression Languages: How can I determine which activities are using different expression languages within my workflow?
Consolidating Expression Languages: What steps should I take to ensure all activities use a single, consistent expression language to prevent this compilation error?
Best Practices: Are there recommended practices to avoid such issues when integrating multiple activities, especially when dealing with external services like Google Cloud Storage?
Your expertise and advice on resolving this matter would be greatly appreciated.
I wanted to update that I’ve identified and resolved the issue.
The Problem: The error occurred because I had copied an activity from a Cross-Platform (VB.NET) project into my current Windows (C#) project. This introduced a mismatch in expression languages (VB.NET vs. C#), leading to the compilation error.
The Solution: To resolve the issue, I recreated the activity manually in the current Windows (C#) project to ensure it adhered to the correct expression language. Once I did this, error stop showing.