update the Escalation Variable Value from the SQL Data Field in K2 Blackpearl.

  • 30 April 2010
  • 0 replies
  • 3 views

Badge

I am Migrating K2 Workflow to the Blackpearl. It is very simple and I am not using any of the SmartObjects or Sharepoint .


One of my datafield used in Esclation / Reminder ( in K2 ) is updated using the SQL SERVER (i.e. the user update the value of  " number of days " in the sql table and it is picked and updated by the workflow ( by using a customized  datahelper class) This had been in K2 2003 ,


But I can not find any  way or example to implement  my customized class in Blackpearl.


Can anyone help me ? I need to update the Escalation Variable Value from the SQL Data Field in K2 Blackpearl.


below is the sample code used in K2 2003


 


### Sample Code being Used using Codemodule


 


public class DataHelper


{


public static int GetEscalation_NoAction_Days(SourceCode.KO.ProcessInstance instance)


{


int pendingDays = GetEscalation_Pending_Days(instance);


return pendingDays + (int)instance.DataFields["Escalation_NoAction_Days"].Value;


}



public static int GetEscalation_Pending_Days(SourceCode.KO.ProcessInstance instance)


{


return (int)instance.DataFields["Escalation_Pending_Days"].Value;


}



public static int GetReminder_NoAction_Days(SourceCode.KO.ProcessInstance instance)


{


int pendingDays = GetReminder_Pending_Days(instance);


return pendingDays + (int)instance.DataFields["Reminder_NoAction_Days"].Value;


}


 


 


 


 


0 replies

Be the first to reply!

Reply