cancel
Showing results for 
Search instead for 
Did you mean: 

Building CUP workflow initiators with multiple conditions

Former Member
0 Kudos

Need help in building CUP initiators with multiple/complex conditions. Have not been able to find any documentation on exactly how the attributes and conditions link together.

Our group wants to build initiators using a combination of application and role name (prefix), and have multiple combinations all going to the same workflow. Listed below are samples of the types of "rules" they want in the initiators.

Does anyone know how to build these, or is it even possible? (We are on version GRC 5.3 SP 11.2)

Thanks.

INITIATOR X RULES:

Role=AAA and application=APL1 or APL2

Role=BBB

INITIATOR Y RULES:

Role=AAA and application=APL3 or APL4

Role=CCC

Role AAA exists on all applications (APL1-APL4)

Role BBB only exists on applications APL1 and APL2

Role CCC only exists on applications APL3 and APL4

Request for role AAA goes to Initiator X if its for application APL1 or APL2, but goes to Initiator Y if for application APL3 or APL4.

Request for role BBB goes to Initiator X (i.e. shares same workflow as AAA/APL1 example).

Request for role CCC goes to Initiator Y (i.e. shares same workflow as AAA/APL3 example).

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bob,

I was facing that problem not long ago. And you are right there is no documentation.

The logic might be logic in china, but not in the western world. The secret is read it bottom up.

I'm having hard time to understand your example, but I guess it is as this:

(Role AAA OR Role BBB) AND (application APL1 OR application APL2)

If you use the spread sheet template it should be like this:

Application APL2 AND

Application APL1 OR

Role BBB AND

Role AAA OR

You notive there is one excess operator. The last (first) operator has to be the same as for Role BBB, because you want the same result if you switch order of the two groups, (A or B) AND (C or D) is the same as (C or D) AND (A or B)

SAP Support promesed me to make a note on this, time will tell...

Kind regards,

Vit

Edited by: Vit Vesely on Sep 16, 2010 8:02 PM

Former Member
0 Kudos

Vit -

I think either

(Role AAA OR Role BBB) AND (application APL1 OR application APL2)

or

(Role BBB) OR (Role AAA AND (application APL1 OR application APL2))

would satisfy the requirement.

Tried your example, but keep getting "attribute conflicts with previous attributes" errors. Seems like there may be a problem with having both a AND and a OR statement for the same attribute.

First tried adding the "Application APL2 AND" attribute, then the "Application APL1 OR" one.

Then tried changing the condition to OR for both of these and it would take "Application APL2 OR" and "Application APL1 OR". However, it then gave me the error when I tried to add "Role BBB AND" and then "Role AAA OR".

The main problem is that we can't really control the grouping. Basically we need to be able to write an IF statement ourselves instead of having the software convert our attributes into one.

Or if we could have multiple initiators call the same path. Then could have one initiator for BBB and another for AAA.

Thanks.

Former Member
0 Kudos

Hi Bob,

Try this:

Backup your initiators. ( (by exporting it to a spreadsheet)

Make a copy of that file.

Edit the copy in excel

Copy my example to the excel.

Delete the rest

Delete all initiators in CUP

Import the excel sheet.

Create a requests with different parameters to test initiator

Add more initiators using the bottom up techniqe.

Import

Test

It will work. Trust me on this.

Vit

Former Member
0 Kudos

Hi,

Seems like you can break the condition to the next stage instead of Initiator level.

You can setup 1st stage with approver determinator with CAD where you can setup & determine different approvers for your case.

Thanks

Laks

Former Member
0 Kudos

Vit -

I imported the records below into the initiators. When I try to build a request for a C_GBS role, it gives me the "multiple initiators" error message.

Thanks.

InitiatorName( Initiator Name ) Attribute( Attribute ) Value( Value ) Condition( Condition )

GPR Application DV3_110 AND

GPR Application RT3_020 OR

GPR Role C_APP* AND

GPR Role C_GBS* OR

GPW_NFP Application DW3_030 AND

GPW_NFP Application RW3_030 OR

GPW_NFP Role C_BW* AND

GPW_NFP Role C_GBS* OR

Former Member
0 Kudos

Hi Bob,

That looks correct to me. Did you delete all other inititors and the conflict is between GPR and GPW_NFP ?

Former Member
0 Kudos

The conflict is between GPR and GPW_NFP. Did not delete the other initiators.

(On a side note, does CUP look at all initiators or only the ones assigned to an active workflow?)

Thanks.

Former Member
0 Kudos

Had a suggestion that I could use the Forks function for what I want. Set up all of my workflows, but make them a Detour (no Initiator) instead of a regular workflow. Then go to Detour/Forks, and use the Forks function to link the initiator to the workflow. This is sort of a reverse fork as described in the documentation. Instead of having one initiator point to two workflows (an SAP and a non-SAP), I'll have several initiators pointing to the same workflow. This should make the Initiators easier to build also, since I could then build one for each application instead of trying to have several applications in the same initiator.

I've got the paths and forks built, but still having a problem with the initiators. I keep getting that "Multiple Initiators" error when I try to build a request for one of those roles that is shared across applications. I think it's still that same issue on it not connecting the attributes and conditions correctly.

Trying to build one initiator for roles used by the DV3 application and another one for roles used by the DW3 application. The C_GBS roles used in both of these applications. (The C_APP and C_BW may also be shared with other systems, but this is all I have built for testing so far.) Here's what I tried last.

Thanks.

DV3_110 INITIATOR Application DV3_110 AND

DV3_110 INITIATOR Role C_APP* AND

DV3_110 INITIATOR Role C_GBS* OR

DW3_030 INITIATOR Application DW3_030 AND

DW3_030 INITIATOR Role C_BW* AND

DW3_030 INITIATOR Role C_GBS* OR

Former Member
0 Kudos

Got the initiators built. I remembered the hint about it reading bottom to top, so I moved the 'Application AND' attribute to the bottom (see sample below).

DV3_110 INITIATOR Role C_APP* OR

DV3_110 INITIATOR Role C_BW* OR

DV3_110 INITIATOR Role C_GBS* OR

DV3_110 INITIATOR Application DV3_110 AND

Using the Detour/Forks suggestion, I've got it where it will work if only one application is on the request. For example, applications DV3 and RT3 have the same workflow, and the requests will go to this workflow if they only contain entries for one of the applications. However, if you build a request that has roles for both DV3 and RT3 in it, you get that "multiple initiators" error when you try to save it.

So close.

Thanks.

Former Member
0 Kudos

All -

FYI, I've discovered two undocumented restictions with CUP workflows.

1. If you want to be able to have a single request contain entries that go to multiple workflows (i.e. parallel requests), you have to build your initiators with role name.

2. If you use role name in your initiators, you cannot have the same name in more than one initiator (no shared roles across workflows).

Thanks.