Skip to main content

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


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 Value from the SQL Data Field.


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.DataFieldsi"Escalation_NoAction_Days"].Value;


}



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


{


return (int)instance.DataFieldsi"Escalation_Pending_Days"].Value;


}



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


{


int pendingDays = GetReminder_Pending_Days(instance);


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


}



 


 


 

Hi Getonline,


Compile all your code into a DLL and add a reference to this DLL to your K2 Process.


In your Escalation you can then instantiate the class and call the methods from the code-behind.


Hope this helps!


Reply