Search code examples
workflowk2k2-smartobjects

SmartObject calling another smartobject K2


I'm new to K2 so the question might be a little weird. I'm currently learning on using SmartObject in my workflow. I'm trying to get user group from SmartObject and using it as a parameter in another SmartObject but the parameter always return empty. Is it possible to call SmartObject as parameter in another SmartObject?

Thank you in advance


Solution

  • Yes, you can certainly use SmO as a parameter from another SmO.

    Make sure you test it using SmO Tester Tool up-front and verify that you receive the desired item. Usually when you are using SmartObjects, you need to provide them with an ID.

    So in this case, you need to make sure that you are providing correct UserName or FQN to "GetUserGroups" method AND to make sure you configure proper filter on return items. GetUserGroups by default returns list of groups, so you need to configure it as "Select First Item" in SmartObject wizard inside your workflow action.