Custom client event wizard

  • 3 February 2011
  • 0 replies
  • 0 views

Badge +1


Hi,


I'm trying to make a minimal custom client event wizard. At run-time it should just generate a user task pointing to a web-page.


I used the K2 Wizard project in VS2010, selected Extend from client event and Code extender.


I only changed the Main method in @safeitemname@.cs to the following:


        public void Main($contexttype$ K2)
        {
            string strURL = "http://www.vg.no/?{SERIALNO}"; // K2.Configuration.InternetUrl;
            strURL = strURL.Replace("{SERIALNO}", K2.SerialNumber);
            K2.AddWorklist("ASP", System.Web.HttpUtility.UrlPathEncode(strURL));
        }


Then build and deployed.


To test the wizard, I made a simple process containing my custom client event. To set a destination user, I used the Destination Rule page on the enclosing activity and added denallixadministrator. Then build and deployed.


To test the process, I used the K2 blackpearl workspace, and created a new instance. It is listed under the process instances as active, but does not appear in the list Workflow ServerWorklists nor in the Worklist for denallixadministrator.


Does anyone see what is wrong or missing?


Cheers,
Bjørn Egil


 


 


0 replies

Be the first to reply!

Reply