Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
anjan_paul
Active Contributor

Hi all,

   This document will show how you can create multilevel workflow using Block. Generally we are using Loop step to create Dynamic multilevel workflow. But Block step gives lot of advance feature like Deadline monitorin, Exception handling etc.

In this example User decision workitem will send to agent one by one i.e after first approver approve, second approver will get the User decision workitem.

So step by step as follows.

1.  Create a multiline container element for UserList.

2. Create a container element for Exit condition from block.

3. Create a Block step. Select ForEach as Block Type.

4. Use your multiline User list element in Dynamic Processing tab.  And give condition for exit from Block.

5. In the Block in Control tab Per Run Binding , bind the _LINE element with WF_PerForEach_Index element.

6. Now create a User Decision Step and put agent as &UserList[_UserList_line]&. It will send to User Decision step determined on perforeach loop index.

7. Add mail step for each outcome. And add Container Operation step in Reject outcome to exit from block if any user take decision to reject.

8. Final workflow design.

9. Now Test thew workflow . Pass User name in the UserList.

10. Now you can easily found that in this example User Decision will go first to BCUSER, then if BCUSER  approved it, it will go to ANJAN.

Its done.

77 Comments
former_member183134
Participant
0 Kudos

Hi Anjan,

Please find the screen shots below.

Only doubt is how to bind in User decision (Multiple container with Index number)

Thanks,

Anand

former_member183134
Participant
0 Kudos

Hi Anjan,

As I said before... If i bind USER in user decision step.. Workitem is going to all at the same time.

If i bind _USER_LINE in user decision step.. noting is happening.. since _USER_LINE is holding the index number not the user name.

Thanks,

Anand

anjan_paul
Active Contributor
0 Kudos

hi,

  please share the screenshot, how you bind the  _USER_LINE

Thanks,

Anjan

former_member183134
Participant
0 Kudos

Hi Anjan,

In the 3rd screen shot i am showing binding in the block and in the 5th screenshot I am binding User in the User decision step.. Please check above screenshots...

I just want to know how to binding in User decision step...multiline container with Index...

How you did the below step.. i cant able to do this.. multi container with index???

In my case like this I am unable to do    ' &User[_UserList_line]&'

If i typed manually in the binding step it is throwing error.

6. Now create a User Decision Step and put agent as &UserList[_UserList_line]&. It will send to User Decision step determined on perforeach loop index.

Thanks.

Anand.

anjan_paul
Active Contributor
0 Kudos

Hi,

  Use  &User[_User_line]&   instead of &User[_UserList_line]&

former_member183134
Participant
0 Kudos

Hi Anjan,

Manually typed the binding  &User[_User_line]& in user decision working fine thank you!!!!

Thanks,

Anand

Former Member
0 Kudos

Hi Anjan,

I am trying this example, however I am unable to activate the WF after using block step. Once I remove the block step, I can activate the WF. There are no errors while syntax check though. Any idea what I could be missing ?

Thanks,

Sid

Former Member
0 Kudos

Resolved. Very nice document Anjan.

suresh_mamilla
Participant
0 Kudos

Hi Anjan,

Very nice document. Thanks for sharing.

StephaneBailleu
Active Contributor
0 Kudos

Hi Paul and Anjan,

Sorry for providing a feedback more than 4 years after...

I have discovered this blog not long ago.. last week

I like the functionality but may be not for a valiation because I think there is one drawback, it is not with the functionality during the conception but rather something missing for the maintenance.

As the agent are being calcuated before and stored in a workflow container, if for one reason or another you have to recalculate the agent, well you won't be able to use the usual worfklow provided tool (SWI1_RULE ) that is why I like using rule directly within the dialog step.

If I have missed something please inform me

Regards

Stephane

former_member356138
Discoverer
0 Kudos
Hello Anjan,

absolutely fantastic document for a UserList Approval Workflow.

I have a question and hope u can help me to solve it. I would like to build in a possibility to bounce the workflow to a Prior Approver in UserList (f.e. User 3 bounces his Decision so User 2 has to approve again).

I tried it by adding a Containeroperation and set forEach_Index back to further number but that does not work. The index gets further in counting and the workflow ends.

Do u have an idea how to solve that?

Thanks,

Patrick

 
anjan_paul
Active Contributor
0 Kudos
Hi,

 

Now that will be quiet complex.  Please check like that way.  Trigger a Event from Block step after  Rejection. After that maintain at  Basic Data  of workflow -> Version   Dependant  ->  Events ->  Maintain the  Event with  Receiver Type  as  'Reevaluate Rule  of  Active  Workitems'.

 

So that if anyone Reject, Workflow active workitem can be start from begining.  Try this and let us know .

 
abdulgaffarmohd
Participant
0 Kudos
Hi Anjan,

 







Not getting "AGENT"



Can you please let me know where exactly binding is missing ..?

 

Thanks in advance.

Regards,

Abdul Gaffar M.
abdulgaffarmohd
Participant
0 Kudos
Hi all,

Execution  user ID  prefixed with "US"



Issue solved.

 

Nice documentation Anjan  🙂

Regards,

Abdul Gaffar M.
sudheer_ganti
Explorer
0 Kudos
Hi Anjan,

Very Nice document. I struck here with deep structure. In my requirement it will be multiple as well as multi level workflow. At first approval there might be more than two and also at second level same like more than two. So I need to use UserList as Deep structure. But in my custom BO - ZBUS2081 I can not declare a parameter with deep structure to method. So hw shoud I resolve this??
sudheer_ganti
Explorer
0 Kudos
How is this possible?? Mine is custom delegated BO method. Here I can not declare parameter with deep structure. So How I should achieve this??
sudheer_ganti
Explorer
0 Kudos
Hi Anjan,

As a simpler way here my requirement is in the UserList I will have one Position ID at each approval level instead of User IDs. For a Position ID I need to fetch all users assigned to it and I need to send work item to  all users assigned to that Position ID at each approval level. How can I achieve this in your Block Step way??
Former Member
0 Kudos
Hi Anjan ,

I just followed the same step as per your suggestion but the issue is if the first person approves the request then it in workflow log it is displaying as pending with second person for approval. but the same request comes again to first person for approval.what might be the issue?

 
Former Member
0 Kudos

Hi Anjan,

I get these warning message in my client’s system:

 

This is my step and binding:

 

 

The strange this is that I tried this out in my company’s sandbox system and it worked perfectly and didn’t give any warning message.

Do you think these warning message mean anything? Am I missing some configuration anywhere?

Thanks,

Aditya.

Former Member
0 Kudos
Former Member
0 Kudos
Hi Anjan,

Excellent Work!

It works beautifully and fits my requirement 🙂

I am facing one issue in the end block section/Ending the workflow.  As in my case, there are 3 levels of approvals.

Incase of approvals, the work item goes from one level to another correctly.

But in case of Reject at any of the levels the workflow should stop and come out of the workflow.

However, it is still in the process stage and the workflow is not ended.

Screenshot attached.

Please provide your input.

Regards

Swamy
0 Kudos
Hello,

I triggered workflow when status of claim notification (tcode iqs1 ) is in 'IN PROCESS'.

I nedd workflow item with user decision button Approve/Reject and link to tcode iqs1. So that users can see claim notification and Approve/Reject with comments.

Workflow need to triggered sequentially to multiple approvers.

I have created user decision step with approve/reject. How to fetch agents in user decision step and trigger workflow sequentially to approvers. Kindly help.

 

Thanks
ashis_lohia
Explorer
Very useful document. Keep up the good work.
0 Kudos

Hey Anjan,

 

Beautiful documentation! ?

Was in need of something like this and this popped up on my search hits.

 

A quick question : I am in need of a updated functionality ; where until all the approvers in notification list approve the work item from their inbox ; it should revert the changes . So basically the reject part in this workflow suits the requirement ; but in the approve part I would need all approvers to approve the work item simultenously.

The approvement should be a asynchronous mode ; unlike the generic functionality which puts the workflow as completed once any user approves the work item .

 

Kindly your help if you happen to know of any such specifications.

 

Thanks in Advance ?

former_member656182
Discoverer
0 Kudos
Hi Swamy,

 

We have the same requirement, Can you please explain on how you created the deep structure inside the container.

Thanks,

Shweta.
hobin
Explorer
0 Kudos
Hi Anjan,

It was a great document, which have used for my developments. But there is a query each there is some other changes on workflow the end condition in Loop Block is getting failed while rejection is happening. When the rejection happens it is flowing to level. So each time I have adjust the end condition of loop block. May this is strange behavior , have you faced anything like that.

Regards

Hobs
0 Kudos
Hello author,

Thanks for amazing blog. In my scenario if I have to execute an activity block only after the final approval ? How can I achieve this ? Please

 

Thanks,

Siddartha  Ramaraju
Labels in this area