Skip to Content

Clarrification regarding MDG WF Agent

There is one business requirement from our client for which I expect some clarification is required

Business Requirement:

In MDG-M workflow concerned agent can select his next approver manually at runtime dynamically without any rule or validation purely depends on personal wish.

  1. Suppose Requestor is ‘X” so that while submitting CR he can select his next agent as ‘Y’ .Then ‘Y’ provides his approval and he can select his next agent as ‘Z’. If Z will need some additional inform then he can select his next agent as ‘Y1’. Then ‘Y1’ provides his approval with additional comment and he can select his next agent as ‘Z’. Finally Z provides his approval.
  2. Suppose same requestor is ‘X” so that while submitting CR he can select his next agent as ‘Y2’ .Then ‘Y2’ provides his approval and he can select his next agent as ‘Z1’. If Z1 will need some additional inform then he can select his next agent as ‘Y3’. Then ‘Y3’ provides his approval with additional comment and he can select his next agent as ‘Z1’. If Z1 will need some additional inform then he can select his next agent as ‘Y2’. Then ‘Y2’ provides his approval with additional comment and he can select his next agent as ‘Z1’. Finally Z1 provides his approval.

I know dynamic agent determination is possible with BADI USMD_SSW_RULE_CONTEXT_PREPARE/USMD_SSW_DYNAMIC_SELECT in MDG but for that also we need to maintain agent value in decision table.

But as per business requirement same requestor can select any agent from his available organization business users.

Can you provide your recommendations for above scenario whether it is possible in MDG or not? If yes then how?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Oct 25, 2017 at 09:46 AM

    Hi Sanjay,

    As you mentioned using the badi USMD_SSW_DYNAMIC_SELECT we can achieve your case 1 & case -2.

    For that you need to build custom fields in the data model and those fields should be available in MDG-UI and when ever requester is select that field or check box based on next agent, workflow will be trigger to that agent which requester is select in your case X->Y1/Y2/Z1 to achieve this requirement also need to be write the code in dynamic agent badi.

    Regards

    Nikhilesh Agarwal

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2017 at 07:26 AM

    Hi Nikhilesh

    Thanks for your reply.

    Do you mean to say for every agent corresponds to one custom field or check box as requestor can choose select next agent manually in UI and there is no validation for that?

    In my case there are nearly 3000 business users acts as agent. I think it is not good idea to add 3000 check box custom fields in UI for requestors selection.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sanjay,

      What you can do is to create a Custom Attribute in the Data Model.(Data element should be same as XUBNAME).

      Provide that Field in the UI & make the OVS Search Help (Using you 3000 business users). You can put the validation too incase user entered invalid id.

      On submission of the Workflow, in your BADI USMD_SSW_DYNAMIC_SELECT, read the custom field using APIs and dynamically assign the agent.

      Cheers,

  • Oct 28, 2017 at 06:03 AM

    Hi Varun

    Thanks for reply.

    Very first question how requestor can select (as per his wish without any validation) next approver.

    Suppose I added button for next button for next approver so that table USR02 comes on fly and he select proper user ID form this, then how system can route workflow to selected agent (No input from users decision table in this case)

    Add comment
    10|10000 characters needed characters exceeded

    • HI Sanjay,

      If you want all 3000 can approve , you need MDG roles to all 3000 users , IF few are suppose to approve than maintaining an custom table with MDG users would be good as approve would only select an MDG approval .

      You can use USR02 based imput help but this would all 3000 users and user might selected an non MDG approve.

      at BADI implementation you can find who approved your request there are api available which can provide who approved request

      ~Varun

  • Oct 27, 2017 at 08:40 AM

    HI Sanjay,

    You can have two fields at your UI

    1. Next approve

    2. Close WF - Check box/Input field - yes/no

    and you can implement wf service and badi (USMD_SSW_DYNAMIC_AGENT_SELECT) .

    Whenever user approve you can check ( implemented badi ) whether next approve maintained , if yes you can send to them if not set status which is meant for WF closure .

    Varun

    Add comment
    10|10000 characters needed characters exceeded