Skip to main content


 

Symptoms


The OOB workflow service based smartobject 'Workflow Comment' is currently being used. We want to be able to customize this smartobject and add in a column that shows the final action taken when that comment is added. We can add a property to the new SO but it doesn't show up in the list when we try to configure the methods which are Add Comment and List.
 

Diagnoses


Same behavior is seen on test environment when attempting to add in the Action property to that smartobject. Recreating the method, refreshing the smartobject, and creating a new smartobject method did not provide a solution.

The issue here is that the service object for those methods are set in stone. They pull from the class SourceCode.Workflow.Client.WorkflowComment class of the K2 API (http://help.k2.com/onlinehelp/K2blackpearl/DevRef/current/default.htm_WFClient_CommentsAttachments.htm). In order to add in that action property to the smartobject methods we would need to be able to manipulate the API, which is not possible.
 

Resolution

Currently this is not possible with the OOB workflow comment smartobject. This has been added to an existing feature request for adding an action property to that smartobject. For now there are the below workarounds that can be utilized:

Workarounds:
1) Create a composite SmartObject using the Workflow Comment and your own custom smartobject. Documentation on Composite Smartobjects can be seen here:

http://help.k2.com/onlinehelp/k2forsharepoint/UserGuide/current/default.htm_Advanced_SmartObject.html?TocPath=Create|Data|Manually%20creating%20SmartObjects%20with%20K2%20Designer|_____2

http://help.k2.com/onlinehelp/K2blackpearl/UserGuide/current/webframe.html_Reference_-_SmartObject_Association_Wizard_-_Association_Method_Mapping__.html

http://community.k2.com/t5/K2-Appit/Creating-composite-SmartObjects/ta-p/70540

2) Create your own comments SmartBox SmartObject or a Comments Smartobject created off of a SQL table. Here you will have full control over the data source and can manipulate the Properties, Associations, and Methods. You can then add in an Actions property and it will show in the Method.

3) You could still use the OOB Workflow Comment smartobject except on the list view we can add a new column that can contain the current Action. Then we could just be sure to populate this control after the create comment method is run. I believe you might have to individually populate the column and this would require a rule separate from the Create method. The only drawback to this would be that the action would not be stored in the smartobject or backend data source. It would only be available on the list view. This is probably the least invasive way to get the design that you are looking for.




 
Be the first to reply!

Reply