We'd like to be able to execute some custom code using K2 Designer for Visual Studio. We have a client event that spawns a worklist item, and once that worklist item goes from 'Available' to 'Open' (and is therefore locked to a specific user), we'd like to be able to make some changes in a separate SQL table. When looking through the Event Item code, we were unable to find a location that references this condition and were wondering if there was any way we could make this happen.
Does anyone have any ideas? Please advise.
Hi, I'm not sure you can add a rule in a workflow which will be aware of if/when the status of the Worklist changes. You could use SmartObjects to some of the Workflow Reporting SmartObjects but this might be complicated and not give you immediate results.
Can you use SmartForms for this? For a worklist item to change status then someone should have opened it, can you add a rule on Form Initializing/ You can add a SmartObject method to the SQL table you have in mind.
There could be a rule that updates a table to verify if the form is being opened for the first time, etc.
I think the best solution would be to develop custom broker which open the worklist item and add some custom stuff just after opening the item.
When a user opens a task, where does it currently go? Typically, the SmartForm or other UI that handles when a task gets open is also the appropriate place to put any extra logic that needs to fire when a task's status changes. The workflow process doesn't listen for task status changes.