Hi,
I'm writing this post to verify, that I didn't overlooked an option.
Situation:
I have a data table to get the data of subworkflows and the base 64 encoded values of their attached images. This data table is used to create a word document. The standard SQL connection uses the bps_user which neither can read data from a separate database nor is the user allowed to read the attachment file table:
"The SELECT permission was denied on the object 'WFAttachmentFiles', database 'BPS_1f6af8fb_Content', schema 'dbo'.."
In "normal" environments we work around this by creating a dedicated SQL user. In this case it's a multi tenant WEBCONAPPS environment. I learned that I can't even configure the database for storing the attachments. They are always stored in the dedicated database.
Ideas:
- Dedicated SQL user, not an option in WEBCONAPPS, I have verified this with the support.
- Changing the attachment database, disabled in WEBCONAPPS
- Creating a view using in the content database to the attachment database. A LinkedServer could be used to read the data in the name of anohter user. Very likely not an option for WEBCONAPPS either.
- The standard function "CONTENT AS BASE64 – returns an attachment in BASE64 format" returns only the value for one attachment. Business rules are executed before the written SQL command is executed so I wouldn't be able to execute this rule with dynamic data.
- In theory I could use the function to populate a multi value string, but I wouldn't do it, even if this would be feasible. This would bloat the database as it would be part of each workflow instance version.
- I could create a technical subworkflow, which stores the data and get's deleted at some point. For deleting it I would need to use the API, as the archive action is not part of WEBCONAPPS. But I have no trigger, to update this workflow when a new attachment is added. A user could just add an attachment. It's not necessary to save the instance. Really complicated and error prone.
- Create an SDK which returns the base64 values, which is used in a business rule, which in turn is used in the data table. The question is, whether this will work in a multi tenant environment and whether I won't run into the same error.
Does anyone have any other ideas or sees an error in mine? I would really be glad, if I overlooked something to get an easy solution.
Best regards,
Daniel