K2ROM WorklistItem Finish

  • 20 September 2007
  • 6 replies
  • 0 views

Badge +1

Hello,

    I have been working with K2Rom in order to manipulate worklist items.  It seems that a call to finish will cause the server to ignore any succeeding rules and finish the activity even if it doesn't pass.  This causes problems in the event that it doesn't pass any line rules.  Is there a way to cause the finish to fail?


Thanks!


6 replies

Badge +5

This should not be the case.  The finish method does not tell the activity that it has successfully completed.  Please check your succeeding rules against the values contained within any datafields.


 Further you can create a succeeding rule and specify something like first variable 1 = second variable 2.  You should definately not see the activity succeed.


 Let us know what you find.


-mike

Badge +1

I took a look at the log, and it shows that the succeeding rule status is false, but then it goes on to the line rule anyway.  Below is a sample of my log when I am attempting to finish the workitem with invalid data.  The succeeding rule specifies that process data field "Code Status" should be either Approved or Rejected.  The two line rules specify either =Approved or <>Approved.  The log shows what happens after I finish the workitem after updating Code Status with a value of "asdf".  It then goes on to the rejection activity and sends me the email for that workitem.
 

 

4401 Authenticated <user> at <ip> using Kerberos
6005 K2ROM Marshal: OpenWorklistItem for <user> at <ip>
6005 K2ROM Marshal: FinishWorklistItem
for <user> at <ip>
6012 Worklist Item with
SN=<servername>,382,9 finished by <user> at <ip>
5080 Executing Succeeding Rule for
Act:Code Review(6), Proc:ProjectPublish(382)
5010 Executing Code Item SucceedingRule -
Code Review
5170 Executed Proc:ProjectPublish(382),
Item:Code Review.SucRule, Status:False
5100 Executing Line Rule Default2(11),
StartAct:Code Review(6), Proc:ProjectPublish(382)
5010 Executing Code Item LineRule -
Default2
5170 Executed
Proc:ProjectPublish(382), Item:Default2.LineRule, Status:True
5120 Executing Preceding Rule for
Act:Rejected(12), Proc:ProjectPublish(382)
5010 Executing Code Item PrecedingRule -
Rejected
5170 Executed Proc:ProjectPublish(382),
Item:Rejected.PrecRule, Status:True
5140 Executing Start Rule for
Act:Rejected(12), Proc:ProjectPublish(382)
5170 Executed Proc:ProjectPublish(382),
Item:Rejected.StartRule, Status:Completed
5160 Executing Dest Rule for
Act:Rejected(12), Proc:ProjectPublish(382)
5010 Executing Code Item DestinationRule
- Rejected
5170 Executed Proc:ProjectPublish(382),
Item:Rejected.DestRule, Status:Completed
5180 Adding User INTJHamilton1 to Dest
Rule for Act:Rejected(12), Proc:ProjectPublish(382)
5100 Executing Line Rule Default1(16),
StartAct:Code Review(6), Proc:ProjectPublish(382)
5010 Executing Code Item LineRule -
Default1
5170 Executed Proc:ProjectPublish(382),
Item:Default1.LineRule, Status:False
5040 Executing Client Event Default
Client(15), Act:Rejected(12), Proc:ProjectPublish(382)
5010 Executing Code Item ClientEvent -
Default Client
5170 Executed Proc:ProjectPublish(382),
Item:Default Client.ClientEvent, Status:Active
Badge +11

Hi CoderJones,


How many Destination users on Activity 'Code Review'?


How many slots for Activity 'Code Review'?


What does your Succeeding Rule look like exactly, can you post the code?


What does your Line rules look like exactly - do you use 'All', 'All Slots', etc?


Have you got a default value for process level datafield 'Code Status' defined?


Regards,


Ockert

Badge +1

1 person is listed as a destination user.  I'm not making use of destination queues.

There is only 1 slot.

Succeeding rule: 

"[{K2.ProcessInstance.DataFields("CodeStatus").Value}] = Approved

Or

[{K2.ProcessInstance.DataFields("CodeStatus").Value}] = Rejected"

 Line rules:

[{K2.ProcessInstance.DataFields("CodeStatus").Value}] <> Approved

another line rule:

[{K2.ProcessInstance.DataFields("CodeStatus").Value}] = Approved

 

I'm not using a default value for Code Status.

 

Thanks 

Badge +11

Hi CoderJones,


If I had to continue debugging this with you, I would suggest to look at the code behind these rules and make sure the 'Type' comparisons are correct and add some Console.WriteLine Lines to the code to see which objects are set to what values at what point in the K2Server console but...


I would highly recommend opening a formal support ticket for this so that you can add your process to the ticket and get a K2 Support consultant to have a look at it.


Regards,


Ockert

Badge +1

I've opened a support ticket.

 

I did Console.Writelines in the succeeding rule, and everything looks good.  The data comes over correctly and evaluates it properly as the correct type. 

Reply