hi All, is it possible to directly change process variables in In process-

hi All,
is it possible to directly change process variables in In process-backed record view ?

thanks in advance.

OriginalPostID-200286

OriginalPostID-200286

  Discussion posts and replies are publicly visible

  • Hi eaglez,

    As in process backed records the information on the record view comes from the process variables - which reflects the latest version of its value stored in the process variable.

    "...directly change process variables" - by this do you mean changing the process variable value in your process instance ?
    If yes - you can do that - here are the 2 scenarios.
    1) Using related action - which is the process itself on which your record is sourced (which on changing the process variable value will change the process record view accordingly)

    2) Using related action - you can have the form asking the updated (new) information with which you want to update the process variable and to and then using the Set External Activity smart node you can directly change that process variable.
    You need to have the process instance id with you which specifies in which of the process instance you want to modify your variable.
    Find below is the URL for this service from the shared component for your reference:
    forum.appian.com/.../summary

    Cons: Changing the value using this wont show up in the Audits in the Process instance history.

    Also, I would strongly recommend to move your process record view to data backed (entity backed) record considering your use case can easily be achieved using entity backed. Also it has huge advantage over process backed record in terms of:
    1) Memory Management no need of long lived processes)
    2) Higher flexibility in terms of customization of the records (facets, search etc)

    Hope it helps !
  • @eaglez Added to the above, I would like to add some more content as follows:

    1. You may create a process which will capture the updates in the database or in the same process in the form of PVs. This process can be either made as a Related Action or you may invoke it using fn!startprocesswrite() at https://forum.appian.com/suite/tempo/records/type/components/item/i8BCLGOdlMUpdGVqT-RV7oRg74uEGJO5yQeCToV_iK9c-uZFaHQndbxbAQOV2CNBg/view/summary in-case if you are looking forward to trigger the process via a SAIL component(such as button).
    2. With regards to updates to PVs in the destination process, you may opt for one of the following:
    a. Configure a 'Receive Message Event' in the destination process and upon receiving the message, the PVs should be updated by performing a database read operation or read values by querying process analytics (based on the process id that has sent message) or read the values from the message itself. This approach needs a 'Send Message' event configuration in the source(Related Action or the process model triggered using fn!startprocesswrite()).
    b. Use 'Set External PVs' smart service at https://forum.appian.com/suite/tempo/records/type/components/item/i4BCLGOdlMUpdGVqT-RV7oRg74uEGJO7ST7vajpgHr5N88A8C7XkID6LIPzexYr/view/summary to make updates in the destination process by making use of the process id. The downside of this approach is that, the 'Set External PVs' might need to be reconfigured as and when there are changes in PVs. And as said earlier, this lacks audit history. This is more or less similar to what other practitioner has said.
  • Thank you very much, siddharthg837 and sikhivahans. Really help me a lot.