How can I start a process model from an interface (by clicking on a userimage) ?

I have read the documentation and I think I have followed what is suggested but I still cannot start the process- from the interface.

this is the section of the interface where I am calling the process model:

a!sideBySideItem(
  item: a!imageField(
    images: a!userImage(
      user: local!currentuser,
      link: a!dynamicLink(
        value: local!imageuser,
        saveInto: a!startProcess(
          processModel: cons!GLP_UPDATEPROFILEPICTURE,
          processParameters: {
            userToUpdate: local!currentuser
          },
          onSuccess: a!save(
            target: local!imageuser,
            value: fv!processInfo
          )
        )
      )
    ),
    isThumbnail: true(),
    style: "AVATAR"
  ),
  width: "MINIMIZE"
),

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    This should start the process model pointed to by cons!GLP_UPDATEPROFILEPICTURE, assuming it's saved and published and the user has at least Viewer-level security for it.  I would point out, just in case your expectations are wrong, that a!startProcess() is asynchronous - meaning any process instance it launches will be in the background and mainly invisible to the user clicking the link.

    Also I'll note that, as far as I can tell, local!imageuser probably isn't doing what you're expecting.  The "onSuccess" save is attempting to capture the *entire* fv!processInfo output into it, whether or not you mean to.  And setting it as the "value" parameter of the dynamicLink call will essentially do nothing (at least nothing directly useful).  But otherwise the configuration looks about right, presuming all the stuff I mentioned in the first paragraph here matches your expectations.

  • I have been trying several things and that is why I had that value in onSuccess. I just changed to:

    value: fv!processInfo.pv.newPicture

    Still, I do not see anything happening and the logs do not record anything. The interface is inside a site, as a page. Couldn't it be something I am missing in the process model? in the start node?

Reply Children