We're working on a BPF and some accompanying workflows for an approval process on projects (a custom project entity). We have a field that is approval status, which has field security to be read-only for most staff, and write for those who can approve. The submission for approval is done through changing the stage in the BPF to "Awaiting Approval" (which of course has a number of requirements of things they need to do before they can advance). When they advance the stage, the idea was to fire a workflow that would change the approval status to "Under Review", and then email the approver that it's ready for review. This all works fine when the person submitting the project is also an approver (i.e. has write permissions to the approval status field).
However, when someone with only read permission does this, it all falls apart. The workflow to update the approval status can't run as that user, since they don't have permission. But to be triggered from the BPF, it must be an on-demand workflow, which means it has to run as the calling user. Okay - so instead of triggering it on the stage change in the BPF, I decided to trigger it as an automatic workflow, but on the change of the stageid field. In this case, it doesn't actually trigger. :-( I tried having the stage change in the BPF set a hidden field that the user did have permission to - "Project Submitted". This works fine. So then I tried having the original workflow trigger automatically (again, so it could run as the owner of the workflow rather than the user) on the change of this new field. This is where it gets interesting. I get an error, saying the user doesn't have write permission to the approval status field (which of course they don't, but the workflow that's changing that isn't being run by the user). But then the workflow runs successfully anyway, changing the approval status and sending the email like I'd expect.
As a test, I tried changing the workflow a background workflow, and there are no errors, and it works. When I look at the process sessions, I can see it's running as the workflow owner. But having it background isn't a solution, as it needs to be real-time so the user sees what's happening.
Any thoughts? Gotta admit, I'm completely stumped on this one.