Forum Academy Marketplace Showcase Pricing Features

Unable to save plugin CSA's published state to database

Hi Guys,
Please excuse if this is an elementary question but would really appreciate the help on this as I couldn’t find it on any other posts on the forum.
CC: @vini_brito , @keith
What I’m doing:

  1. Writing a plugin with client side action
  2. It exposes two states location and price
  3. Both the exposed states are being pushed using instace.publishState(“location”, “location”)
  4. I’m able to see the value in the workflow when I’m setting a custom state [csLocation] as well.
  5. However, I’m not being able to assign to a thing in the db
  6. Create new thing, thing’s location = Element A’s location
  7. Create new thing, thing’s location = csLocation’s value
    Neither 1 nor 2 are working as both fields in the database are empty for the created thing.
    And I didn’t observe any errors in the debugger or in the logs.
    I could be missing something here, please hlep.

Thanks in advance.

I think you can use a triggerEvent, then use that publishState from that event in the workflow. It works for me.

Read my thread: Help me finish my plugin - #7 by locnguyen1312