Skip to main content

Im using the workflow comment SO in my processes and Im getting a request to also inclued the action that was selected by the user in the comments. So if a person selected "Approved" it would show in the comments as well as the standard comment information. So far, even though I can create a custom SO from the service instance its not letting me map the property to a method even though it allows me to add the property. Am I barking up the wrong tree?

 

thanks

 

Dave

I don't think you'd have to get that complicated. From where are you calling this service? If you are calling from a form, you could have a hidden data label with an expression that combines the comment text box and the action selection and then use the datalabel for an input property. You won't be able to concatenate smart object properties in a method mapping. Your best bet is combining the input.

 

A screen shot of what you are trying to do would also help if I am missing the mark.

 

Hope this helps.

 

S.


So you are saying to just add the action data label value at the end of the comment? Sort of like "comment comment comment comment comment - Approved" ?


No. I was saying that you could include the action when the comment was taken.  I am a little fuzzy on exactly what you are attempting to accomlish where. If you are attempting to capture the user's action when the comment is created, then you could take the approach I mentioned.

 

If you are attempting to return a list of comments with actions after the fact that will be a bit more invovled. In that case you could theoretically combine the comments and K2 reporting smart objects, but I forsee a potential realtionship problem with the join.


Actually when you look a a comment view it shows the comment, the persons name that created and the date. I just wanted to add another property showing the action they selected when the form was submitted. So it would be Comment, persons name, date, and action (Approved, Rejected etc)


I cobbled together an example. Please see the attached smartobject example. I essentially joined the comments with the activity instance destination smart object. Please remember that the person viewing the output of this object will need View reporting rights on the process as K2 reporting data is security trimmed.

 

Given your scenario, your mileage with this may vary as i can see some issues with the relationship between the two data sources, but if it will be a one to one between comments and actions you should be fine.

 

Hope this helps or spawns some thought.

 

S.


That looks really slick! I didnt know you could combine methods like that. I havent tried it in a process yes but in each client event, the user either has to leave a comment due to actions or a default comment of "No Previous Comment" is entered on submit. So optimally the comment and the action of the person completing the task should be listed on subsequent form views. Or thats at least how I understand you created it. If it works, this will be perfect! I will let you know.

 

thanks

 

Dave


Im testing a view with the new SO. Im using the ProcInstID as the input mapping. The results for my existing comments view is:

 

14656iD376D5B9FD25BBB6.jpg

 

Not sure how to interpret the data.


Reply