cancel
Showing results for 
Search instead for 
Did you mean: 

Using Conditions within SAP Build PA (Workflow) Branch

verreydthans
Participant
0 Kudos

Hi,

Anyone knows how to deal with following?

I've a workflow in SAP Build Process Automation, and I use a Branch to display parallel tasks for our departments.

Branch -> Department A, B & C.

I want to use a condition, where I use some variables (use_A, use_B, use_C).

In my opinion, It can be easy:

-> Go in the Branch -> Before using the Forms (Departments A, B or C), add a Condition to check if the Department is needed. If not, skip that Form (and wait till other departments has provide input).

I see that we can not create a Condition, inside a Branch

- Question 1: Is this something that can be provided in the future?

- Question 2: Any (easy) work around?
--> I can for example create multiple conditions before the branch and put every possible outcome in different conditions. But this way, the flow get's very big if we've a lot of departments...

Example:

Thanks in advanced!

Regards,

Hans

Accepted Solutions (0)

Answers (3)

Answers (3)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

I did a little more work on this and this is what I found work, using the new subprocesses and custom variables. I think soon this scenario will be easier when they add formulas and other new features.

I created a generic subprocess, which has an input of email address and boolean of whether approval is needed. Then there are 2 decisions: one outputs true if either the process is approved or if the process does not require approval; the other outputs false if the approval was rejected.

The subprocess uses a custom variable, either decision's output is assigned to this variable, and the subprocesses output is assigned to this variable.

The decisions are simple text rules with boolean in and boolean out, and a dummy rule that outputs either true or false.

The main process is simple. You just add a branch for each approval you want, and add one of the generic subprocesses to that branch. You need to map a boolean to each subprocess which indicates whether the approval is required.

After that, you create a condition that checks all the outputs of the subprocesses to see that they are all true.

Currently, you can assign different email addresses (approvers) to each subprocess, but the form is the same. You could also create inputs for the name of the group or any other text so the forms would be different. A lot here depends on your exact scenario.

I think we could make it simpler and not having to create the second condition manually by automatically counting the number of approvals required and then seeing if we get that many approvals at the end.

Hope this helps.

P.S.: If you like either of the answers, please accept

verreydthans
Participant
0 Kudos

Hi Daniel,

Good thinking!

So instead of using the condition inside the branch, you create a subprocess, with the condition and the form.

That's indeed not so bad! I'll check it out!

Thx!

Regards,

Hans

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

I would imagine the way you should work is to have a subprocess for each department, and in this subprocess you can have the condition. I created a form with checkboxes for each of the departments.

I then created a branch with one branch for each department (only 2 shown below).

In each process you have a condition and then the approval or reject.

You can add an output variable variable that will be set to a boolean to indicate whether this approval process was successful (either approved or not needing approval). You can even reuse the forms and decisions so having 10 departments won't be that big of a deal.

What do you think?