Symptoms
Dear Bashar,
Please feedback , if out of the box featues available to STOP / Delete a K2 instance from Samrtforms button click.
Regards,
Diagnoses
The way i see it is to build a dll that references k2 SourceCode.Workflow.Management API then right code that executes the delete as in :
http://community.k2.com/t5/K2-blackpearl/how-to-delete-process-instance-programmatically/td-p/40885
then register a new Service Instance within the Endpoints Assembly Service for your DLL to create a new smartobject that is used to delete the process instance.
Please see a similar implementation
http://bliblablog.net/add-class-library-to-k2-blackpearl-as-endpoints-assembly/
http://bliblablog.net/control-visibilty-of-smartforms-elements-with-k2-blackpearl-process-permissions/
Please see this too it is about Building a endpoint assembly for K2 Blackpearl
https://www.youtube.com/watch?v=vX6e08U1oEg
"
Resolution
"
The way i see it is to build a dll that references k2 SourceCode.Workflow.Management API then right code that executes the delete as in :
http://community.k2.com/t5/K2-blackpearl/how-to-delete-process-instance-programmatically/td-p/40885
then register a new Service Instance within the Endpoints Assembly Service for your DLL to create a new smartobject that is used to delete the process instance.
Please see a similar implementation
http://bliblablog.net/add-class-library-to-k2-blackpearl-as-endpoints-assembly/
http://bliblablog.net/control-visibilty-of-smartforms-elements-with-k2-blackpearl-process-permissions/
Please see this too it is about Building a endpoint assembly for K2 Blackpearl
https://www.youtube.com/watch?v=vX6e08U1oEg
"