cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow need to start at the node where it was rejected but not frm start

Former Member
0 Kudos

Hi,

I have a scenario where the workflow is a employee resignation custom workflow.

Here the case is - when ever the reviewer or the approver rejects the workitem in the workflow the workflow stops and it returns back to the initializer ie the employee who has resigned...

the moment the employee makes the required changes the workflow starts from the 1st level where as the workflow should start at the point it was rejected but not from the start.....

The point where it was rejected, or the level where it was rejected it has to start at the same level but not from the start or the 1st step of the workflow...

Kindly suggest me that how do i place the scenario where the workflow starts at the node where it was rejected intially...

Thanks in advance,,,

shanky

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I'm not sure if you fixed this problem or not. But any way, there are many solutions. This is one:

1- Create an "approval level" counter. make sure it contains the value 1 initially

2- Create a loop that terminates when the maximum level of approval is exceeded (if "approval level" > max approval level)

3- Inside the loop do the following:

3.1- Insert the logic that extracts the approver of the current "approval level" (do NOT increment the counter yet)

3.2- Insert the approval step

3.3- Read the approver and the approval result

3.4- If approved:

3.4.a- Increment the "approval level" counter

3.5- Else, if rejected:

3.5.a- Insert a step to go back to the employee asking for the changes to be made

Former Member
0 Kudos

Hi,

A simple solution could be use of a multiline container element which holds ID of all the approvers with the approval index.

So when the Workitem is rejected, you can store the approval index and then when changes are done, write a background method to fetch approver based on the index when the request was rejected.

Regards,

Sangvir Singh

Former Member
0 Kudos

Hi,

Could you plzz brief me in a better possible way

kindly explain in better possible way.....

Thanks,

shanky

nabheetscn
Active Contributor
0 Kudos

Keep a loop in your workflow which will determine the level for each count. Lets say whenever it is rejected dont reset the level and it will again go back to same level. But to exit from loop you have to put a condition like when fully approved set the flag and exit or if the employee takes back his resignation.

Please let me know if you need more details.

Nabheet

Former Member
0 Kudos

Hi,

Here what i am doing is

I am running a loop based on the levels there in the entire workflow

Here there are 8 levels in the workflow, so rather going for 8 consecutive step workflow. I have placed the entire step in one loop to robust the entire process...

Placing all the levels in one condition, and running the loop. I am trying to capture the Approval or Reject status after every loop run to see the status and based on that - the level will be determined

My question over here is - Once the loop is run and i am able to determine the status - whether it is a rejection or an approval.

as the values are stored in a workflow container or in "z" table (varies from situation to situation) -

I did not understand that - how do i place the method ( which determines the level ) and at what position..should it be in the loop or after the loop...

kindly clarify this as this the only major concern which i have...

thanks,

shanky

Edited by: shanky s on Oct 24, 2010 10:56 AM

nabheetscn
Active Contributor
0 Kudos

Here is what you have yo do.

1. Initilize d first level.

2. Start the loop.

3. Determine approver at each level.

4. If approver rejects it send it to employee if employee resubmits loop will continue from same level and if employee deletes it then set flag to exit loop.

5. If approver approves it determine next level and once all approvals are dpne exit the loop.

Note. Please make 2-3 global variables for capturing the current and last level etc.

You will be able to solve it.

Nabheet

Former Member
0 Kudos

Hi,

I think the point was not clear to you....

after the 1st level, I will start the loop and i will also find the employee ( based on the level ) who has rejected it and send it to the employee.

But how will the employee(workflow initiator) will understand that which employee has rejected and how to send it back to that level to start the remaining process...

so what step should i use here to send it back to the employee to start the remaining process

Thanks.....

shanky

nabheetscn
Active Contributor
0 Kudos

Store the emploee who rejected it and at what level next time initialize the level to this rejection level. Worklflow will start from there. I think if you declare some gloabl variables and thinkthrough them you will be ablet to crack it.

Nabheet