Get current manager from workflow context field

  • 15 July 2013
  • 6 replies
  • 2 views

Badge +6

The K2 process would generate the task for a user. If user dosen't action the task in stupilated time. An esculation would be generate and his manager will be notified. The process uses, Workflow Context fields 'Activity Destination', to get the Destination Users, Manger and generate a notification. Since, the Manager has left the organization, the process moves to error state.
To resolve this, I cannot perform goto activity to go back to pervious actvity and get the updated manager as this is esculation.


Is there a way, to update the Workflow Context field to get current Manager from AD? Or any other soultion that would help me to get out of this suitation.

Thanks


6 replies

Badge +10

Can't you use the GOTO to go to the same activity.  It'll reinitialize the activity and although the escalation clock will start all over again if it goes to escalation again it'll pick up the current manager from AD.


Will this happen all the time?  Sometimes I find its not worth it to handle every situation through the process design but to handle one off exceptions through the administration council like using the GOTO.

Badge +4

Hi Timkn,


In our process we should not allowed to use Go TO activity. Please suggest us other than GO TO Activity.


Can we achiev  this through coding ?

Badge +13

If your get your manager dynamically from AD then retry on the error after a new manager is assigned should work.   If you stored the manager in data field then you can use the K2 API/DataInjector from Blackmarket to update the data field for new manager.

Badge +4

HI All ,


I do agree that whenever i do retry for my error instance it should pick Manager information at the runtime. But in my scenario wherein im using ActivityInstDestinationUser FQN to the smartobject which returns the Email address to send the escalation mail.


Currently my instances are in error state -"Smartobject is empty"


I did retry- but its of no luck- 


TO confirm whether the manager information is there are on - i ran the GUserdetails SO to confirm it, everthing is ther - but i have no idea why this is going in to error state.


-TO avoid this type of scenario i thought build an utility which update the workflow conttext fields at the runtime for particular process instance- but  it is not posible because - all workflow context fields like Manger information, mail address are readonly property.


Can someone help me out in this type scenario.


Or please let me know your suggestions about this scenario to avoid in read future.


Kind Regards


Prajwal Shambhu......:):)!!!!!

Badge +13

Try using GotoActivity and put it back to the same activity?

Badge +4

Hi Peter,


i dont have a control to perform GO TO Activity on this process. Requirement is in such a way that without performing GO TO Activity i need to correct this instance.


Please help me with other options other than Go TO Activity.


 


Thanks n Regards


Prajwal Shambhu

Reply