Viewing a started instance

  • 13 June 2007
  • 4 replies
  • 0 views

Badge +1

Hi,


I created a process instance via ASP.NET code and want to view this instance in the K2.NET service manager. However, even though the user has all rights in the Service Manager, i am unable to view the started process.


Please see code snippet below -


***************************************************************************** 


SourceCode.K2ROM.

Connection oK2Connection =


new SourceCode.K2ROM.Connection();


string connectionString = System.String.Empty;


connectionString =

";Authentication=Windows;Domain=GIPACS;User=Administrator;Password=Passwd@12";


oK2Connection.Open(

"192.168.10.203", connectionString);


SourceCode.K2ROM.

ProcessInstance oProcessInstance;


 


oProcessInstance = oK2Connection.CreateProcessInstance(

"Trial ProjectTrialProcess", 3);


oK2Connection.StartProcessInstance(oProcessInstance);


****************************************** 


Thanks in advance for your help.


4 replies

Badge +11

Have a look in 'c:program filesK2.net 2003Bin' for a file called K2Error[Timestamp].txt.  Maybe an error occured that you're not aware of.  Also, in Service Manager, right click on Error Profiles and create a new Error Profile showing ALL errors.  Once created, select this Error Profile and check for any errors.


HTH,


Ockert

Badge +1

Hi Ockert,


Ther is no text file in the folder mentioned and I also did not see any errors logged in the error profile created.


Are there any settings that could be missing while granting rights? Also, I wanted to know why is that the account that creates the process instance does not have rights to view it automatically - why do the rights have to be given specifically?


Appreciate your help - am stuck on this since the past 2 days now...:-(


Thanks  


 


 


 

Badge +13

Where are you trying to view it?  If you are viewing within Worklist of Service Manager, you must add the item to the K2's worklist vis AddWorklist method.   If you are viewing within the process' instances on service manager, make sure the user ID is listed as Admin within the specific process.

    Function HTTPFunction(ByVal K2 As ClientEventContext)
        Dim strURL As String
        strURL = "http://" & K2.StringTable("WebAppServer") & APPLICATION_URL
        strURL = strURL.Replace("{SERIALNO}",K2.SerialNumber)
        K2.AddWorklist("ASP",System.Web.HttpUtility.UrlPathEncode(strURL))
    End Function

Badge +8
Something else to remember is that you can only view running process instances in Service Manager. Once your process has been completed, you will not be able to get a handle on that process instance in Service Manager. It will only be visible through Workspace (quering the Log database), check in there if your process is still active.

Reply