Good Day for All. I need do any validation for WF ster wich view variouse button for variouse users. For example: if logon User 1(security group1) hi see 2 buttons(b1 and b2), if logon User 2(sequrity group2)hi see 1 button (b1). Can you attach exaple of SQL validations. Thanks in Advice
You could also do this by using a single Action Button to move the request but having an autocomplete or list validation be your "buttons" by providing the options for your transitions. You could make the validation SQL key on [SYS.USER_ID] to provide different options to different people.
Sure, look at any of the seeded validations with "(restricted)" in their name...they usually have some SQL restricting values by [SYS.USER_ID]
To see if the user is in a specific group, maybe use something like:
where exists ( select 1 from KNTA_USER_SECURITY us , KNTA_SECURITY_GROUPS sg where us.user_id = [SYS.USER_ID] and us.security_group_id = sg.security_group_id and sg.enabled_flag = 'Y' and sg.security_group_name = '' )
Restrict each of the steps to the appropriate users or groups and bring the workflow together with an OR-step, so only one needs to be executed. If you need to have only one enabled at all, you will need an execution step that does the routing. Look in one of the seeded workflows for a step called priority router as an example. I think it is the DEM - Bug workflow (it has a German name in our instance).
I interpreted the initial requirements a bit differently than what you are describing. Different users need to see different sets of buttons. If this is done with parallel workflow steps, common buttons could go to an OR step like you say, but unique transitions could not go to a common OR step. Also, I am assuming that once a user clicks one of the buttons available to them, all of the other users should not be allowed to click another button. In other words, only one button should be clicked among all of the parallel steps. How does a user clicking a button for one enabled step disable all of the parallel steps available to ohter users?
I think Erik has suggested a beautiful solution and a single decision step would serve the purpose. Create the validation of the decision workflow step as autocomplete which would return the values based on the logged in user.