a month ago
Hi All,
I'm working on an approval workflow on BPA (a simple Business Process with a step for an approval) and as of now, the approvers are simply "hardcoded" in the approval step:
As is, if we release and deploy the project and we want to change the approver in the future we would need to undeploy, go into the step and update the recipients, release and deploy again a new version of the project. Is there a cleaner way of doing this?
I was investigating the use of Environment Variables but I'm note sure if I understand the goal of these:
My idea was to have a variable for which I can define its value without having to deploy a new project version each time. I was expecting for this string environment variable to be available as a process input or variable to be referenced in the different steps, but I can't find it anywhere. Ideally, I'd like to change the value of this environment variable having it referenced in the approval step instead of a 'harcorded' user ID.
In Task Automation projects though I can see and use the environment variables that I define, but not in Business Processes.
I have been navigating the SAP Help Portal regarding environment variables but can't figure out how to use them, or if I can use them to achieve what I explained in this post.
If the intent of environment variables is not the above, does anyone have a better way of updating recipients of a task without having to deploy new project versions? Maybe @Dan_Wroblewski, any ideas?
Thanks!
3 weeks ago
The values of environment variables are set when you deploy the process, so I don;t think that would meet your needs.
Off the top of my head, you could create a decision in a separate project, and then create a dependency to the decision in your project to take the output of the decision. Everytime you want to change the user you would just need to update the decision project. See this Devtoberfest session where they talk about making decisions as dependencies: https://www.youtube.com/watch?v=ajbnWJvVNuQ
Not sure this is the best, since you still have to deploy the decision each time, but that is simpler than the entire project.
If this isn't clear let me know. I also see if there is a better way.
3 weeks ago
Hi Dan,
Thanks for the quick reply.
The downside of this is that you would still need to redeploy the project, unless I'm missing something; if you update the decision project it would create a new version, and you won't be able to update the dependency to the newer version on a deployed project, so you will end up deploying again regardless.
I do think this is actually valuable information, on bigger projects with complex approver determination rules it seems good practice to keep this separate from the business process workflow, so thank you for the tip!
It seems that for now all we can do is having a service with a table of approvers maintaned somewhere else, and simply calling its content from BPA
3 weeks ago
3 weeks ago
Environmental variable will not work for you. The IDP / IAS based solution, proposed by Dan will work, but each change will require IDP or IAS admin privileges. Another solution, where approvers could be managed by designated person without any IDP / IAS admin privileges would be as follows:
1. get a database like HANA Cloud or any other, where you can expose the table vis ODATA and create the approvers table.
2. Build approvers administration app in Build Apps, which uses the approvers table exposed by ODATA and give approvers administrator access to this app.
3. Let approvers administrator put approvers in the table.
4. Create ACTION in SBPA to get data by ODATA from approvers table.
5. Use process variable to store the approver fetched by ACTION for the process.
6. Use this process variable in the "Approvers" field of your approval form.
This solution much more complicated than the one proposed by Dan, but it does not require IDP / IAS admin privileges to maintain approvers.
3 weeks ago
Hi Jakub,
Yes, ODATA is another possibility which probably we will end up going for. I was exploring and hoping that we could achieve it by just using the tools that BPA has within it, but sadly couldn't make it.
Thank you both!