cancel
Showing results for 
Search instead for 
Did you mean: 

Process Schema determination from a BRF expression

Former Member
0 Kudos

Hi Experts,


Currently a "Process Schema" has been assigned as a constant to a BRF expression in SRM Process controlled workflow.


Now, my requirement is that two process schema's have to be called based on certain conditions.


To be more elaborate, user attributes have to be read and if user attribute is found, Process Schema 1 needs to be called else Process schema 2 needs to be called.


Since this is not possible via constant, I am think to create an expression with type function module in which code could be written to validate user attributes.


After validation, could you please suggest how to assign the Process schema in the Function module which would be assigned to the new custom expression.


Please let me know if I am not clear with my requirements.

Thanks for your help in advance.


Best regards,
Raghavendra.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Raghu,

You can define a schema with truth table and have two expressions in it for each of the process schema selection

Regards

Sam

ashish_shah
Contributor
0 Kudos

Hi Raghu,

You can refer this blog:

Refer Step 2 - Customer approver in that blog, it shows you how to create an expression which will call a FM.

In this FM(a copy from BRF_CALL_FUNCTION_TEMPLATE) implement your logic to determine schema based on your condition.

You associate this expression with an event and specify this event in process schema evaluation as shown in following blog:

Let me know if you need more information.

Regards,

Ashish

Former Member
0 Kudos

Dear Raghu,

I will try to tell you as per my little understanding.

Keep your Function module expression's return type as char 30.

In your actual function module expression write your business logic/condition to get appropriate expressions.

After your business condition create a temporary char 1 flag variable.

Logic should be like, after your business logic

if flag = 'X'.

ev_value = 'ZEXPRESSION1'. " If it is X then your BRF schema zexpression1  should be selected.

else.

ev_value = 'ZEXPRESSION2'.

endif.

This is just a hint. You may check if condition based on your ev_value. your ev_value returns the schema value. But make sure that you have defined your both process scheme definition in the process level configuration.

Create a final expression of type boolean, and place your rules here.

Best regards.

Former Member
0 Kudos

Hi Abhijit,

Thanks for your reply.

We would go ahead and do the code in FM as you suggested.

After finishing the chnages, I will get back to you with the results.

best regards,

Raghavendra.